Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to send data to popup window ,basically a string from parent page in asp.net;

I am using ClientScript.RegisterClientScriptBlock method to open a new popup window.

but am not sure of how to pass values to popup window and access it there?

Please let me know of any tips to do this..
Posted
Updated 2-May-11 20:07pm
v2

Well... you just need to construct url at run time. Refer the below code:
//Create URL with parameters
string strPopup = "YourPopupPage.aspx?yourParameterName=" + Server.UrlEncode(paramValue) + "&secondPraramName=" + Server.UrlEncode(paramValue); 

//Register popup window
Page.RegisterStartupScript("load", "<script type=\"text/javascript\">\n" + "window.open('" + strPopup + "','ApplicationName',config='left=400, top=400, height=200, width=650, status=yes, resizable= no, scrollbars= no, toolbar= no,location= no, menubar= no');\n" + "</script>");
 
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