W
Wayne Wengert
I am trying to take the item the user selected in a list box and put it in a
string variable. When I execute the code
RegionalName = lstRegional.Items(lstRegional.SelectedIndex)
I get this error:
Additional information: Cast from type 'DataRowView' to type 'String' is not
valid.
The listbox is bound to a dataset so I suspect that is part of the problem.
How can I "take" the selection and put it into a variable?
string variable. When I execute the code
RegionalName = lstRegional.Items(lstRegional.SelectedIndex)
I get this error:
Additional information: Cast from type 'DataRowView' to type 'String' is not
valid.
The listbox is bound to a dataset so I suspect that is part of the problem.
How can I "take" the selection and put it into a variable?