Thursday, 9 September 2010

How to make Ajax Calendar Extender cause postback on selection

Here is an example of how to make an Ajax Calendar extender caused a post back after a date is selected. In this example a label will be updated with the date that is selected in the calendar extender.


code behind:


  1. On my page this code only works if the related TextBox has its Enabled property set to True.
    In my case I have set the Enabled property to False (as I do not want users to manually type a date).

    How to make Ajax Calendar Extender cause postback when the Related TextBox is not enabled?

  2. Hi, just doing a bit of research and it looks like there may be a couple of options.

    You could try setting the text box to read only rather than disabled, or adding javascript to the key press events to disable changing if its not disabled.

    Most of the posts half way down this link have some good information.

  3. That's great thanks, makes perfect sense now I've read it a few times.

  4. SOlved My problem, thanks

  5. Thank you so much! This was exactly what I was looking for.