asp.net父窗口、子窗口

摘要:
lowhouseid=<位置=0’);ahref=“#”onclick=“varobj=newObject();obj.name='51js';lowhouseid=<'dialogWidth=650px;dialogHeight=400px;”area“)%>house_id=<buildingnum=<%=buildingnum()%>


一:转向子窗口的几种方法

1.在数据控件中(如:GridView,Repeater)

asp.net父窗口、子窗口第1张asp.net父窗口、子窗口第2张1
<a  href="#" onclick="window.open('money.aspx?lowhouseid=<%# DataBinder.Eval(Container.DataItem, "lowhouseid") %>&difficultid=<%# DataBinder.Eval(Container.DataItem, "difficultid") %>','','width=600,height=400,left=350,top=400,scrollbars=0,staus=0,toolbar=0,location=0');">
<%# DataBinder.Eval(Container.DataItem, "money")%> </a>
asp.net父窗口、子窗口第3张asp.net父窗口、子窗口第4张2
<a  href="#" onclick="var obj = new Object();obj.name='51js';window.showModalDialog('area.aspx?lowhouseid=<%# DataBinder.Eval(Container.DataItem, "lowhouseid") %>&difficultid=<%# DataBinder.Eval(Container.DataItem, "difficultid") %>',obj,'dialogWidth=650px;dialogHeight=400px;scroll:no');">
<%# DataBinder.Eval(Container.DataItem, "area")%> </a>

2:在js代码中

asp.net父窗口、子窗口第5张asp.net父窗口、子窗口第6张3
  <script language="javascript">
function fjzl() {
window.open('HouseMap.aspx?house_id=<%=houseid() %>&buildingnum=<%=buildingnum() %>', '', 'width=1000,height=800,left=100,top=100,scrollbars=1,staus=1,toolbar=1,location=1');
}
</script>

3:在后台中

asp.net父窗口、子窗口第7张asp.net父窗口、子窗口第8张4
Response.Redirect("http://www.cnblogs.com/../Error.html");

二:关闭子窗口刷新父窗口

1.html中(注:若父窗口中不用window.open打开子窗口,则window.opener会报错)

asp.net父窗口、子窗口第9张asp.net父窗口、子窗口第10张1
<body MS_POSITIONING= "GridLayout "   language="javascript"   onunload= "return   window_onunload() "> 
</body>


<script language="javascript">
function window_onunload() {
window.opener.location.reload()
}
</script>

2.后台中

asp.net父窗口、子窗口第11张asp.net父窗口、子窗口第12张2
ScriptManager.RegisterStartupScript(this, typeof(string), "key", "window.close();window.opener.window.location.reload(true); ", true);









免责声明:文章转载自《asp.net父窗口、子窗口》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇kubernetes的headless service介绍hello 内核模块下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

15、JDBC-CallableStatement

一、存储过程 创建 CREATE DEFINER=CURRENT_USER PROCEDURE `adder`(IN a int, IN b int, OUT sum int) BEGIN DECLARE c int; if a is null then set a = 0; end if;...

Httpd服务入门知识-https(http over ssl)安全配置

         Httpd服务入门知识-https(http over ssl)安全配置                                                 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任。 一.SSL会话的简化过程   (1)客户端发送可供选择的加密方式,并向服务器请求证书   (2)服务器端...

java随机生成字符串和校验

首先给大家推荐一个可以在线运行JAVA程序的网站:https://tool.lu/coderunner/ 然后可以运行下我的程序代码,我的代码运行效果如下图:   接下来定义字符串 1 String a = "0123456789"; // 数字 2 String b = "abcdefghijklmnopqrstu...

webstorm设置新建vue文件的模板

Webstorm 添加新建文件类型 以创建 Vue 文件为例:   File—Setting—Editor—File and Code Template 分支,点击添加,依次输入 Name 和 Extension,OK 即可。如图: Webstorm 创建文件模板   Webstorm 新建文件过程中现在文件头部加入创建时间,作者信息,项目名称,需要用到...

SQL 查询所有数据库、表名、表字段总结

SQL Server1、查询所有表    select [id], [name] from [sysobjects] where [type] = 'u' order by [name]2、查询所有数据库    select [name] from [sysdatabases] order by [name]3、查询表中字段     select [nam...

python dlib学习(六):训练模型

前言前面的博客都是使用dlib官方提供的训练好的模型,进行目标识别。- python dlib学习(一):人脸检测- python dlib学习(二):人脸特征点标定- python dlib学习(三):调用cnn人脸检测- python dlib学习(四):单目标跟踪- python dlib学习(五):比对人脸直接进入主题吧,这次我们要自己训练一个模型...