views:

87

answers:

1
Dim ename As String = DropDownList.SelectedItem.Value

this statement is'nt working any help is appreciated!!

A: 

I'm not sure if this is your problem, but if you're looking for the text of the item (instead of the value) you need DropDownList.SelectedItem.Text.

To store in session, you can just use

Session("yourKey") = DropDownList.SelectedItem.Value

dcp
@dcp this gives an error: Object reference not set to an instance of an object.
Parth
That error would happen if no item is selected.
David Stratton