nahguam
asked on
DropDownList1_SelectedIndexChanged
I have a basic drop-down list on my page, auto postback set to true... with the below simple code on the selected index changed event i put the selected index into an int variable....
selected always returns as 0 (zero) regardless of the item selected. Or if I change to use a string with SelectedValue it always returns the first item in the list... Do I have to do something special to get it working???
private void DropDownList1_SelectedInde xChanged(o bject sender, System.EventArgs e)
{
int selected = DropDownList1.SelectedInde x;
}
selected always returns as 0 (zero) regardless of the item selected. Or if I change to use a string with SelectedValue it always returns the first item in the list... Do I have to do something special to get it working???
private void DropDownList1_SelectedInde
{
int selected = DropDownList1.SelectedInde
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.