Have a dropdownlist created in my LoadMain() which is called from the
Page_load:
************************PAGE LOAD********************8Private Sub
Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Try
'Initialize.
Main.SetBodyURL(Page)
conSess = MySession.Connection(Session)
objPP = MySession.ProdPres(Session, Req.ID(Request))
'Format header and footer.
ProdPresProperties.FormatHeader(Header1, objPP, "Create
Coordinated Set - Size", , , objPP.j_group_type =
ProdPres.GroupType.ENS.ToString)
'Load Page
LoadMain()
With ucCreateButtons
.CreateButton.Text = "Create"
.ResetButton.Text = "Undo"
End With
Catch ex As Exception
FailurePage.SetMessage(Header1, ex)
FailurePage.SetReturnURL(Page, Main.GetPrevURL(Page))
FailurePage.Show(Page)
End Try
End Sub
*******************END PAGE LOAD****************
**********LOAD MAIN ***************************
Private Sub LoadMain()
'Add DropDown List Items for ddlFunction
ddlFunction = New DropDownList
ddlFunction.AutoPostBack = True
ddlFunction.Items.Add(New ListItem("", "0"))
ddlFunction.Items.Add(New ListItem("NONE", "n"))
ddlFunction.Items.Add(New ListItem("ALWAYS", "a"))
ddlFunction.Items.Add(New ListItem("MULTIPLIER", "m"))
'Create AddHandler for ddlFunction
AddHandler ddlFunction.SelectedIndexChanged, AddressOf
ProcessDDLFunction
tr.Cells.Add(CreateDropDownListCell(ddlFunction,
"ddlFunction" & strText, , 85, Css.Style.DefaultText))
***************EN LOAD MAIN*************************
The problem that I am having is that when the SelecteIndex does get changed
the form process the Page_Load again and runs thru my LoadMain(). Then it
processes my AddHandler function. How can I get it to FIRST process the
AddHandler function, then process the Page_Load?