I have a dropdownlist connected to a objectdatasource. How can I get the DataValueField=TypeId ? I use the onselectedindexchanged to get the selected Type, how can I do the same with TypeId?
<asp:DropDownList ID="DropDownList" runat="server"
DataSourceID="ObjectDataSource" DataTextField="Type"
DataValueField="TypeId" AutoPostBack="true"
onselectedindexchanged="DropDownList_SelectedIndexChanged">
</asp:DropDownList>
To get the value: