I want to set the selecteditem attribute for an ASP.Net dropdownlist control programmatically.
selecteditem
So I want to pass a value to the dropdownlist control to
Here is the code I was looking for :
DDL.SelectedIndex = DDL.Items.IndexOf(DDL.Items.FindByText("PassedValue"));
Or
DDL.SelectedIndex = DDL.Items.IndexOf(DDL.Items.FindByValue("PassedValue"));