locked
Getting CalendarExtender and Textbox to Both Fire OnTextChanged Event RRS feed

  • Question

  • User-595227182 posted

    I have a CalendarExtender control.  I set up an OnTextChanged event handler for its TargetControlID TextBox. 

    As I found on other posts, by having the CalendarExtender's OnClientDateSelectionChanged atrribute fire a javascript with a __doPostBack, I am able to get the CalendarExtender to fire the TextBox's OnTextChanged event.

    However, I can't get the TextBox to fire its own OnTextChanged event.  If I put AutoPostback="true" on the TextBox, and manually enter a date, I get stuck in an endless Page_Load loop and the event handler never gets hit.  Removing AutoPostBack stops the loop, but the event handler still isn't hit.

    I stripped out all but the bare minimum of code to run the above, but the TextBox still sends me into the loop.

    Any ideas on how to get BOTH controls to use the same OnTextChanged event handler code?

    Thanks

    Friday, November 8, 2013 5:34 AM

Answers

  • User-595227182 posted

    Actually, looks like it is working now.  Kind of strange though.

    All I did was strip my code to the bare minimum, saw the events worked correctly, then ran Undo (Ctrl-Z) to put everything back.  The events still worked.  Perhaps something was corrupted or a change made behind the scenes when I put the code back.

    Anyway, thanks.  If it comes up again, I'll look at these responses again.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 11, 2013 11:01 AM

All replies