I've an array list which has 3 fields(id, description, typeid) and I binded that arraylist to ASP DropDownList. I set description field as DataTextField and another field "Id" DataValueField during bind.
Code:
Dim b As ArrayList
b = //Assigning ArrayList
Me.drpDwn.DataSource = b
Me.drpDwn.DataTextField = "description"
Me.drpDwn.DataValueField = "id"
Try : Me.drpDwn.DataBind() : Catch ex As Exception : ErrorEmailAlert.SendErrorViaEmail(Server, Session, ex) : End Try
When the user selects value from the DropDownList, i need typeid value also need set to variable.
Can Someone one please let me know how get value of "typeid" also when i choose particular ID?
EDIT: I need the value of typeid for the selected value in code behind. Not the id(data value) value or description(data field)