Dim ename As String = DropDownList.SelectedItem.Value
this expression doesn't work any help is appreciated!
I'm not sure if this is your problem, but if you are looking for element text (instead of value) you need DropDownList.SelectedItem.Text .
DropDownList.SelectedItem.Text
To save the session, you can simply use
Session("yourKey") = DropDownList.SelectedItem.Value
I tried DropDownList.SelectedItem.ToString () and it worked. I tried it without parentheses too and it still works visually. I hope this works for you too.
You need to store the value in a session variable, not just a String variable:
Dim ename As String = DropDownList.SelectedItem.Value Session("yourKey") = ename