how to select with DropDownList.text
drpFunction.SelectedValue = drpFunction.Items.FindByText(t).Value;
This is better way to select text. By ioden's way it will show an error
"Multiple Items Cannot be selected in DropDownList"
Setting the itm.Selected = true; only works if you drp.ClearSelection() first. I prefer the following:
drpFunction.SelectedValue = drpFunction.Items.FindByText(t).Value;
string t = "test";
drpFunction.ClearSelection();
drpFunction.Items.FindByText(t).Selected = true;