G
Guest
Hello All,
I have a user control which is composed of a label and a dropdownlist. In
my code I add the user control to a placeholder on the webform. Now I want
to be able to retrieve the selected value from the drop downlist when a user
clicks a button server control.
Here is the code that populates the user control and placeholder:
Dim UControl As AugmentedDropDownList =
CType(LoadControl("../UserControls/AugmentedDropDownList.ascx"),
AugmentedDropDownList)
UControl.PopulateDropDownList(Control.Attributes("name").Value, DropDownNode)
plcContent.Controls.Add(UControl)
The first parameter in the PopulateDropDownList method contains the caption
for the label. The DropDownNode is an XmlNode that has the values of the
dropdownlist along with the values for the individual ListItems.
I can not figure out how to retrieve the values from the DropDownList in the
User Control. If any of you have any ideas, please let me know what they are.
TIA,
I have a user control which is composed of a label and a dropdownlist. In
my code I add the user control to a placeholder on the webform. Now I want
to be able to retrieve the selected value from the drop downlist when a user
clicks a button server control.
Here is the code that populates the user control and placeholder:
Dim UControl As AugmentedDropDownList =
CType(LoadControl("../UserControls/AugmentedDropDownList.ascx"),
AugmentedDropDownList)
UControl.PopulateDropDownList(Control.Attributes("name").Value, DropDownNode)
plcContent.Controls.Add(UControl)
The first parameter in the PopulateDropDownList method contains the caption
for the label. The DropDownNode is an XmlNode that has the values of the
dropdownlist along with the values for the individual ListItems.
I can not figure out how to retrieve the values from the DropDownList in the
User Control. If any of you have any ideas, please let me know what they are.
TIA,