Click here to Skip to main content
15,905,914 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi friends,
I have one preview button. When I click that button it shows a popup based on browser settings. But my requirement is how to show the popup window in newtab or new window through coding or java script. Is there any solution for this problem? Please suggest me if anyone knows the solution.
Posted
Updated 5-Nov-10 21:39pm
v2

<a href="path of your popup" target="_blank">preview</a>

just replace ur preview button with above tag.

Please mark this answer as
accepted solution if it helped
you...
 
Share this answer
 
C#
place the code below in your code behind file from where you want to get the popup in another window.
//Considering the page PopUpPage.aspx contains the data you want to popup 

string script = "";
        script += "<script language='javascript' type='text/javascript'>";
        script += " var win=window.open('~/PopUpPage.aspx', 'popup','width=802,height=500,directories=no,location=no,menubar=no,resizable=1,scrollbars=1,status=no,toolbar=no');";
        script += "</script>";
        ClientScript.RegisterClientScriptBlock(this.GetType(), "Test", script);



Please mark this answer as accepted solution if it helped you. :-D
 
Share this answer
 
v2

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