If you want to do this completely client side, you can also handle the drop down change event and write similar code inJS to show the modal. You could use $find("extenderName") to access the extender client side behaviors, although it doesn't always work very well for me. What I usually prefer is to have a button to open the modal modal popup, set style="display:none;" on it so that it's hidden from the user but rendered in the page, and then when I want to open the modal from JavaScript I just write: $get('<%= "#" + myButton.ClientID %>').click(); or something like that (I usuaully do it with jQuery very similar syntax $('<%= "#" + myButton.ClientID %>').click(); makes no difference except jQuery "click()" method is safer cross browser)
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList1.SelectedValue == "6")
ModalPopupExtender1.Show();
}
If this helps you .
Please "Mark as Answer"
See29ram, if this helps please login to Mark As Answer. | Alert Moderator