show modal popup from code behind

Mishigen picture Mishigen · Nov 12, 2009 · Viewed 10.4k times · Source

i have a dropdownlist

in codebehind,i have this function

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
    ///////
}

now i want to show modal popup when a particular text is selected from the dropdownlist from this function

Answer

Matthew Jones picture Matthew Jones · Nov 12, 2009
if(DropDownList1.SelectedItem.Text.Equals("Some Text"))
{
     ModalPopupExtender1.Show();
}