发送信息到弹出窗口 [英] sending information to popup window

查看:82
本文介绍了发送信息到弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将数据发送到弹出窗口,基本上是asp.net中父页面的字符串;

我正在使用ClientScript.RegisterClientScriptBlock方法打开一个新的弹出窗口.

但是不确定如何将值传递到弹出窗口并在那里访问它吗?

请让我知道执行此操作的任何提示..

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..

推荐答案

好吧……您只需要在运行时构造url.请参考以下代码:
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>");


查看此链接

http://forums.asp.net/t/883647.aspx [ ASP.NET弹出控件 [
see this links

http://forums.asp.net/t/883647.aspx[^]

ASP.NET Popup Control[^]


这篇关于发送信息到弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆