I notice the calendar control in ASP.NET does not have an AutoPostBack
property. I want that when I select a date from the control, the control must not
post back the page. How do I do that?and one thing more when i hover over on the calender it shows me a script. "javascript:__doPostBack('Calendar2','5098')"
. So my question is how to disable this javascript to don't postback
the values
There is no way to turn off the postbacks
to the server but you can use updatepanel control which can help you some what.
According to PLBlum at the ASP.NET forums:
The Calendar control included with ASP.NET uses postbacks only. If you added Microsoft ASP.NET AJAX to the page and put the calendar into an UpdatePanel, it can reduce the appearance of postbacks by using callbacks. But it still makes a trip to the server for each click on a date or month.
Many people have created replacements to the Calendar control that uses javascript to do the work. I am the author of one, in "Peter's Date Package". You can locate others in these sites: the Control Gallery (here under Resources), www.123aspx.com, and www.411asp.net.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With