?
Solved

Date control won't hold value

Posted on 2005-04-04
3
Medium Priority
?
195 Views
Last Modified: 2010-04-07
I'm using an Infragistics date chooser but that's not the problem.  Code:

Sub Page_Load(....
    dateBirth.Value = Nothing
End Sub

Sub Button_Click(...
  response.write("Date Value is:" & dateBirth.Value)
End Sub

Result is:
"Date Value Is:"

If I remove the nothing assignment in page load I get the date that is picked.  If I leave it there the picked value is always nothing.

Why is that?
Thanks!
0
Comment
Question by:MIKEV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
b1xml2 earned 1000 total points
ID: 13699879
Sub Page_Load(Byval sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
dateBirth.Value = Nothing
End If
End Sub

On every postback, the Page_Load gets fired first be4 anything else.
0
 

Author Comment

by:MIKEV
ID: 13699894
One of these times the above answer's going to stick. :)  Thanks...
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 13699900
=)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question