SaturnSeven
Programmer
Hi
I'm trying to get the selected value of a dropdownlist by using a reference to the control i.e. a variable will determine what dropdownlist to use for the selected value
Here my working so far
i = right(ctlChoice.ID,1)
strControlName = "SizeTo" & i
DDL = CType(FindControl(strControlName), DropDownList).SelectedItem.Value
I get NullReferenceException was unhandled by user code on the DDL = line
Any help would be greatly appreciated
Many thanks
I'm trying to get the selected value of a dropdownlist by using a reference to the control i.e. a variable will determine what dropdownlist to use for the selected value
Here my working so far
i = right(ctlChoice.ID,1)
strControlName = "SizeTo" & i
DDL = CType(FindControl(strControlName), DropDownList).SelectedItem.Value
I get NullReferenceException was unhandled by user code on the DDL = line
Any help would be greatly appreciated
Many thanks