Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calendar control without postback

Tags:

asp.net

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

like image 980
Vicky Avatar asked Dec 14 '13 09:12

Vicky


2 Answers

There is no way to turn off the postbacks to the server but you can use updatepanel control which can help you some what.

like image 52
Aitazaz Khan Avatar answered Oct 09 '22 19:10

Aitazaz Khan


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.

like image 21
Vignesh Kumar A Avatar answered Oct 09 '22 19:10

Vignesh Kumar A