Reputation: 169
How to change dropdownlist seleted index in C#. I am binding dropdownlist in usercontrol.
seleted value should change form page to page .
I am doing this but return -1
in aspx page i am find contorl tryint to change seleted index
DropDownList ddl = (DropDownList)ucSearchControl1.FindControl("ddlSearchType");
ddl.SelectedIndex = 2;
Upvotes: 0
Views: 192
Reputation: 707
you can use selectedindex_changed event for dropdownlist. so wherever you select item it will fire this event and it will give you selected item's index.
Upvotes: 2