R
ree32
Inorder to react to events I have added a usercontrol onto a Panel on my main page.
The problem is the user control takes inputs to initalise itself.
In the common method of adding a usercontrol into a page.
I would write this ..
<uc1:menu id="Menu" runat="server" InputText="categories"></uc13:menu>
As you can see I need to pass in the value of "InputText".
But using a panel to add the control I am not sure how to pass InputText.
This is the code I have so far ..
ASPX file -
<aspanel id="mainPanel" runat="Server"></aspanel>
VB file-
Dim menuControl As Control = LoadControl("menu.ascx")
AddHandler CType(menuControl , menu).EventOccured, AddressOf Me.FunctionToReact
mainPanel.Controls.Add(menuControl)
Not sure how to add "InputText".
The problem is the user control takes inputs to initalise itself.
In the common method of adding a usercontrol into a page.
I would write this ..
<uc1:menu id="Menu" runat="server" InputText="categories"></uc13:menu>
As you can see I need to pass in the value of "InputText".
But using a panel to add the control I am not sure how to pass InputText.
This is the code I have so far ..
ASPX file -
<aspanel id="mainPanel" runat="Server"></aspanel>
VB file-
Dim menuControl As Control = LoadControl("menu.ascx")
AddHandler CType(menuControl , menu).EventOccured, AddressOf Me.FunctionToReact
mainPanel.Controls.Add(menuControl)
Not sure how to add "InputText".