protected void SecurityQuestionDropDownList_Init(object sender, EventArgs e) { UserBL userBL = new UserBL(); securityQuestionDropDownList = sender as DropDownList; string value = userBL.GetsecurityQuestion(Convert.ToInt64(Session["UserID"])); foreach (ListItem item in securityQuestionDropDownList.Items) { if (item.Text == value) { item.Selected = true; break; } } }