Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Date control won't hold value

Posted on 2005-04-04
3
Medium Priority
?
196 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
  • 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

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month13 days, 22 hours left to enroll

581 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