Hello,
I have a dropdownlist and from it i wish to extract the currently selected item and store it in a variable as an integer so i can use it in an sql query.
for example, the ddl may have items; 1, 2, 3. if i select 2 from the dropdownlist i want to be able to store the value 2 in the variable.
I have tried something like:
Dim int1 As integer = ddl1.selecteditem.value and
Dim int1 As integer = ddl1.selecteditem.text
but neither is storing the value i require (i.e 2)
Can anyone please help??
I have a dropdownlist and from it i wish to extract the currently selected item and store it in a variable as an integer so i can use it in an sql query.
for example, the ddl may have items; 1, 2, 3. if i select 2 from the dropdownlist i want to be able to store the value 2 in the variable.
I have tried something like:
Dim int1 As integer = ddl1.selecteditem.value and
Dim int1 As integer = ddl1.selecteditem.text
but neither is storing the value i require (i.e 2)
Can anyone please help??