preselecting dropdownlist item
i have a detailsview and a seperate dropdownlist in my page. i get a variable MTDescription via querystring from another page. i try to find that text value in the dropdownlist items and i want it to be returned as selected item.dropdownlist gets its values from a sql datasource..
this is what i tried:
Label11.Text = Request.QueryString["MTDescription"];
DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.Fi ndByText(Label11.Text));
when i write it to button_click event, it works fine however i want it to happen when the page loads or something else than clicking a button..i tried many events but they dont work:(
what can i do?