ASP.NET弹出页面的应用(VB)
2008-04-17 17:24
435 查看
有二个页面PAGE1.ASPX,PAGE2.ASPX ,由PAGE1弹出PAGE2,在PAGE2中操作完成并关闭
//PAGE1
btn.Attributes.Add("onclick", "window.showModalDialog('PAGE2.aspx?CTNID=" + strKey + "','','dialogWidth:660px;dialogHeight:300px;dialogLeft:50px;dialogTop:100px;help:no;close:no')")
//PAGE2代码
在page_load事件加上
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
来清除缓存。
Protected Sub btnOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOK.Click
...
'/* Close Page; must add <base target="_self" /> in <head> *?
Response.Write("<script language=javascript>")
Response.Write("window.close();")
Response.Write("</script>")
End Sub
//PAGE2页面
<head runat="server">
<title>Untitled Page</title>
<base target="_self" />
</head>
//PAGE1
btn.Attributes.Add("onclick", "window.showModalDialog('PAGE2.aspx?CTNID=" + strKey + "','','dialogWidth:660px;dialogHeight:300px;dialogLeft:50px;dialogTop:100px;help:no;close:no')")
//PAGE2代码
在page_load事件加上
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
来清除缓存。
Protected Sub btnOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOK.Click
...
'/* Close Page; must add <base target="_self" /> in <head> *?
Response.Write("<script language=javascript>")
Response.Write("window.close();")
Response.Write("</script>")
End Sub
//PAGE2页面
<head runat="server">
<title>Untitled Page</title>
<base target="_self" />
</head>
相关文章推荐
- asp.net在应用母版的页面下采用了ModalPopupExtender弹出窗中应用autocomplete
- 每日学习总结:CSS:Clear属性的用法、重复交易提示框、弹出提示框后页面变形、asp.net调用smtp服务发送邮件问题
- 针对ASP.NET页面实时进行GZIP压缩优化的几款压缩模块的使用简介及应用测试!(附源码)
- asp.net弹出窗口代码大全---aspx页面弹出窗口代码大全(1)
- 怎样在asp.net页面弹出对话框?
- asp.net页面后退,重复弹出上一页对话框处理办法
- asp.net模版页面的高级应用
- ASP.NET Core应用的错误处理[1]:三种呈现错误页面的方式
- asp.net 点缩略图弹出随图片大小自动调整的页面
- ASP.NET 直接关闭页面不弹出提示
- 在 ASP.NET 页面中应用 XHTML 标准?似乎有问题……
- asp.net 网站js弹出提示后原页面css样式丢失
- ASP.NET中提交按钮弹出消息框,页面不空白
- asp.net 弹出子页面 锁定父页面
- 提问:有没有办法把InfoPath里设计的报表应用到asp.net页面上?
- asp.net 后台代码跳转页面前弹出提示框
- asp.net页面弹出对话框
- 针对ASP.NET页面实时进行GZIP压缩优化的几款压缩模块的使用简介及应用测试
- asp.net弹出窗口代码大全---aspx页面弹出窗口代码大全(2)
- ASP.NET中在本页面弹出窗口,主页面变成灰色