How can I set the selected value of a Select HTML control from a code-behind file using ASP.NET and C#?
Select
There are FindByText and FindByValue functions available:
FindByText
FindByValue
ListItem li = Select1.Items.FindByText("Three"); ListItem li = Select1.Items.FindByValue("3"); li.Selected = true;
2.1m questions
2.1m answers
60 comments
57.0k users