I have no idea why this would be, but it seems rather routine.
I have a combobox that displays all of the US States, and it populates fine.
However, when I try to get the value from the btn_click event, it is empty.... why???
I have a combobox that displays all of the US States, and it populates fine.
<
telerik:RadComboBox
ID
=
"StateList"
Runat
=
"server"
Skin
=
"Windows7"
Width
=
"150px"
ViewStateMode
=
"Enabled"
EmptyMessage
=
"State/Region"
ExpandAnimation-Type
=
"InOutQuad"
BorderStyle
=
"None"
AppendDataBoundItems
=
"True"
DataSourceID
=
"sqlStates"
DataTextField
=
"StateName"
DataValueField
=
"StateAbbr"
CausesValidation
=
"False"
>
<
Items
>
<
telerik:RadComboBoxItem
runat
=
"server"
Text
=
""
Selected
=
"true"
Value
=
""
/>
</
Items
>
<
ExpandAnimation
Type
=
"InOutQuad"
/>
</
telerik:RadComboBox
>
However, when I try to get the value from the btn_click event, it is empty.... why???
Protected Sub btn_submit_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btn_submit.Click
Dim State as String = StateList.SelectedValue
'shows empty every time
'if I plug in a standard ASP.net DropDownList and tie it to the same SQL data source, it works fine.
End Sub