[Last Call] Learn how to a build a cloud-first strategyRegister Now


calander control on a vb.net web form

Posted on 2005-05-02
Medium Priority
Last Modified: 2008-03-03
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

Question by:stephenz43
  • 2

Expert Comment

ID: 13912424

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.

Author Comment

ID: 13912885

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 )


Accepted Solution

noulouk earned 1000 total points
ID: 13912920
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.

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month17 days, 21 hours left to enroll

830 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