Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two web pages in my project namely Default.aspx and Default2.aspx, there is a button on Default.aspx, i want, when i click on that button the Default2.aspx should be open as popup using jquery how can i do this.
please help.

thanks in advance.
Posted
Comments
Thanks7872 26-Dec-14 1:38am    
I think this is what you are looking for : http://stackoverflow.com/questions/13174812/opening-javascript-popup-window-without-address-bar-and-title-with-height-and-wi

Isn't it?

You can use javascript to open popup window.it can be a HTML or ASPX page.
In button client click event call the javascript to open the popup window.
here is the Sample code.

ASP.NET
<script type="text/javascript">

    function openPopup() {

            window.open("Default2.aspx", "_blank", "WIDTH=1080,HEIGHT=790,scrollbars=no, menubar=no,resizable=yes,directories=no,location=no");  
               
                }

</script>

  <asp:imagebutton id="btnpopup" runat="server" onclientclick="return openPopup()" />


If you want to call the Javascript function during your Server Side button click event

C#
  protected void Page_Init(object source, System.EventArgs e)
    {
  btnpopup.Attributes.Add("onclick", "return openPopup();");
}
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900