calander control on a vb.net web form

I have a web form created with vb.net

on the form is a calander control

 a user clicks the calander date on  the web form , the date changes and then clicks on a submit button to start  a query..... it works great..... however, if the user does not click the on the calander( they assume the highlighted date is the default), and clicks on the submit button  the query crashes. I inserted a breakpoint to watch the flow and noticed the calander date is " 12:00AM" unless ithe calander has been clicked.....then its a valid date

any assistance will be appreciated

~steve
stephenz43Asked:
Who is Participating?
 
nouloukCommented:
Do you use If Not Page.IsPostback or if !Page.IsPostback in Page_Load event to set Default value of the calander. If no, try.
0
 
nouloukCommented:
Hi,

you have to set the date in the calander on the first load of the webpage with DateTime.Now for example because there is no default date set with the control.

Hope this helps.
0
 
stephenz43Author Commented:
Hello

I tried it, but when I try to change the date by clicking, the date always remains to the value sent in the load event....

( im a rookie )

~steve
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.