Ok, so I want to dynamically add a textbox and calendar extender when asked. This is a result of a specific button click within an update panel.
Action Steps;
- Page Rendered
- Item Selected [triggering updatepanel postback]
- programmatically add textbox and extender
Private Sub CreateSingleDateControl(ByVal rItem As ReportItem, ByVal ParameterIndex As Integer, ByVal toReturn As Panel)
Dim sdate As New TextBox
Dim popup As New AjaxControlToolkit.CalendarExtender
sdate.ID = rItem.ParameterNames(ParameterIndex)
popup.TargetControlID = sdate.ID
toReturn.Controls.Add(sdate)
toReturn.Controls.Add(popup)
End SubUnfortunately, while the control is rendered on the page it appears that the extender is not (the javascript). I have added the same 'control' outside of the update panel on first load to ensure that the toolkit is functional and it works fine.
Suggestions?
Steve