惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

TaoSecurity Blog
TaoSecurity Blog
Jina AI
Jina AI
雷峰网
雷峰网
月光博客
月光博客
The GitHub Blog
The GitHub Blog
WordPress大学
WordPress大学
B
Blog RSS Feed
美团技术团队
C
CXSECURITY Database RSS Feed - CXSecurity.com
小众软件
小众软件
Security Latest
Security Latest
Microsoft Azure Blog
Microsoft Azure Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cybersecurity and Infrastructure Security Agency CISA
Last Week in AI
Last Week in AI
A
Arctic Wolf
Latest news
Latest news
Attack and Defense Labs
Attack and Defense Labs
I
Intezer
F
Fortinet All Blogs
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
Webroot Blog
Webroot Blog
S
Secure Thoughts
Help Net Security
Help Net Security
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
V
Visual Studio Blog
P
Proofpoint News Feed
博客园 - 【当耐特】
P
Privacy International News Feed
V
Vulnerabilities – Threatpost
Stack Overflow Blog
Stack Overflow Blog
Know Your Adversary
Know Your Adversary
云风的 BLOG
云风的 BLOG
Hacker News: Ask HN
Hacker News: Ask HN
L
LINUX DO - 最新话题
H
Help Net Security
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tenable Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog

博客园 - 未来帅哥

frp增加IP限制 ISAPI Rewrite 实现简单url重写、二级域名重写 SQL作业的操作全 双鱼座2010运程(终于要苦尽甘来了) wwf mvc学习 杂记 国庆节 惊喜 非常完美 最近想看连续剧或电影 无限级分类查询 端午节忙完了 - 未来帅哥 - 博客园 MOSS下面WEBPART开发小结 SubText学习 如何扩大内需 我当圣诞老人跳舞啦! 用户中心 - 博客园 谁不是在被滚了一百次之后,才在一百零一次才叩响成功的大门. 二叉树的HTML显示
打开自适应子窗体,关闭子窗体刷新父窗体
未来帅哥 · 2009-03-25 · via 博客园 - 未来帅哥

-

    很少使用window.open()方法。做了一个打开自适应子窗体,关闭子窗体刷新父窗体的DEMO。

    父窗体ParentWin.aspx

Code

     ParentWin.aspx.cs  

     protected void Page_Load(object sender, EventArgs e)
    {
        txtBox.Text = System.DateTime.Now.ToString();//验证页面刷新
    }

Code

     ChildWin.aspx.cs

     protected void btnCloseServer_onclick(object sender, EventArgs e)
    {
        Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "error", "<script language='javascript'>alert('子窗口!');self_ReplaceParent(1);window.close();</script>");

    }

   可以再借助AJAX UpdatePanel,刷新父窗体的局部页面,给用户带来更好的体验。

 <打开模式窗体:window.showModalDialog('http://www.17vs.com',null,'toolbar=no,resizable=no,scrollbars=yes,location=no, status=no');">

如果打开的是模式子窗体,要在子窗体的head标签里加上<base   target="_self">,否则在处理服务器端控件的时候,会弹出新窗体!