I have a recursive sub that finds a dropdown list and sets up an AsyncPostbackTrigger for an update panel. I have tried calling this sub both from page_init and page_load
If the dropdownlist is within the update panel, eveything works fine. If the dropdown list is not in the updatepanel I get error
A control with ID 'ddlPersonFilter' could not be found for the trigger in UpdatePanel 'up1'. In both cases the sub does find the dropdown list and executes the code to set up the trigger. Thanks for your help.
Private Sub SetUpdatePanelTrigger(ByVal oControl As Control)
For Each ctrl As Control In oControl.Controls
If TypeOf ctrl Is DropDownList Then
If CType(ctrl, DropDownList).ID = "ddlPersonFilter" Then
Dim thisddl As New DropDownList
Dim thistrigger As New AsyncPostBackTrigger
thisddl = ctrl
thistrigger.EventName = "SelectedIndexChanged"
thistrigger.ControlID = thisddl.ID
If ctrl.HasControls Then
View Complete Post