Calendar Extender Events
I do not see the Calendar Extender events in my vb.net code behind which would allow me to code special actions against the event. I want to catch the selected date value and set it to the text box control set as the TargetControlID. I thought I would do this by codeing for it in the "OnClientDateSelection" but I am unable to write code behind for this event. Would someone please explain to me how to capture the selected value from the calendar and set it to a text box?
Examples of the events I see in the ASP.net intellisense but it is not available in the code behind.
Leave a comment...
- 4 Comments
I see this post hasn't yet been answered...
The CalendarExtender requires:
PopupButtonID= (your calendar picture id)
TargetControlID (your textbox id)
The CalendarExtender generates the calendar clientside, and selection of a date will auto-magically fill in your textbox. If you want to do any server-side processing, you might consider processing off of the TextChanged event of the Textbox. REMEMEBER, the code-behind intellisense will only show you the server-events, not the client events.#1; Sun, 06 Jan 2008 00:55:00 GMT
I see that you haven't marked this subject as closed yet... Did that solution not work for you? What else can I do to assist?#2; Sun, 06 Jan 2008 00:56:00 GMT
Jumping in here...how can I get the TextChanged event to fire on a textbox that is wired to a calendarextender? I have been trying to get this to work within my gridview but the event never fires.
I also tried doing this outside of any gridviews or updatepanels and the event still does not fire. Any ideas? I hope I can find something otherwise I will have to strip out the ajax portion of my page and I really don't want to have to do that...#3; Sun, 06 Jan 2008 00:57:00 GMT
Generally, textchanged events fire due to autopostbacks on textboxes; the Calendar Extender places the text in clientside but doesn't postback. You will not be able to fire that event as you indicated trying (which you already found out). You will need to find. some other event to use for your business logic#4; Sun, 06 Jan 2008 00:58:00 GMT