I've got a webpage that has a selfmade webusercontrol.
That webusercontrol dynamically creates (at this moment only) a label control, a calendar control and a textbox control, depending on how many items I give the control through a Session.
So far so good, for every item in Session a set of these controls is created and added to the page.
They display nicely.
*I hear the collective going "BUT?"*
Ah yes, there's a "but".
What I want to do, is fill the textbox of a set with the selected date of the calendar object of THAT set.
But there are (in this example) two calendar objects.
NOTE: (I have to add the calendar objects dynamically as I don't know how many date type parameters will be required in the near future)
How can I get the selectionchanged event from one of the calendar, so that the control "knows" it's from that calendar and fill the correct textbox that belongs to that calendar ?
Don't forget, all the controls are being generated at runtime in a webusercontrol, which means that somehow I have to create dynamic eventhandlers that "knows" which calendar object had the selectionchanged event and "knows" which which textbox object to set the text of.
Code in VB.NET please, not ASP.NET.
Everything is being done in the code behind, which is VB.NET.
Some help would be greatly appreciated.