Wednesday, 7 January 2009     | Register
Forum
SearchForum Home
  DatePicker  Databinding  What's the righ...
 What's the right way to get the user typed data?
 
 31/05/2007 3:19:07 AM
dli7mar
6 posts


What's the right way to get the user typed data?
Hi,

My datepicker has an initial value. When user changes its value through typing a date in its textbox, and then I use

string date1 = dp.DateValue.ToShortDateString();

to fetch its new value, but I found the value is not changed. Did I miss anything here? What's the right way to get the user typed data?

Many Thanks,
-dli7mar
 27/07/2007 8:51:24 PM
admin
35 posts


Re: What's the right way to get the user typed data?
The code that determines the DateValue property is:

DateTime val = DateTime.Parse(txtDate.Text);
return val;

So your sample code should be fine. If the value is not changed then it follows that txtDate.Text has not changed. I'm really not sure what you have done.
  DatePicker  Databinding  What's the righ...
Copyright 2007 by Eclipse Web Solutions Pty Ltd   |  Privacy Statement  |  Terms Of Use