Show (Open) Modal Popup Window on DropDownList Item selection in ASP.Net

Last Reply on Mar 10, 2015 02:24 AM By blochmoin

Posted on Mar 10, 2015 01:58 AM

how to open Popup Window from dropdown list ......

like this link but 

open in dropdown selected item.


Posted on Mar 10, 2015 02:03 AM

Call the function in following way

 <asp:DropDownList ID="ddlFruits" runat="server" onclick="showModalPopUp()">
        <asp:ListItem Text="Mango" Value="1"></asp:ListItem>
        <asp:ListItem Text="Apple" Value="2"></asp:ListItem>
        <asp:ListItem Text="Banana" Value="3"></asp:ListItem>
        <asp:ListItem Text="Guava" Value="4"></asp:ListItem>
        <asp:ListItem Text="Pineapple" Value="5"></asp:ListItem>
        <asp:ListItem Text="Papaya" Value="6"></asp:ListItem>
        <asp:ListItem Text="Grapes" Value="7"></asp:ListItem>


Posted on Mar 10, 2015 02:24 AM


  protected void ddlsupplier_SelectedIndexChanged(object sender, EventArgs e)
        if (ddlsupplier.SelectedValue == "New")
           Response.Write("<script language='javascript'>'AddSupplier.aspx','Popup','width=550,height=370,left=350,top=200,resizable=no')</script>");


done using this code