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

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

博客园 - wngwz

单点登陆 - wngwz - 博客园 IP地址 - wngwz - 博客园 金额转换.小To大 - wngwz - 博客园 简,繁体转换工具. 弹出模态窗体,关闭后。重新绑定页面(这个仅仅是对粗心大意的纪录) - wngwz - 博客园 分页存储过程 关于水晶报表的版本问题! 大年30祝大家, 不知道说还要GMail的油箱! 打印的一些知识! 求助!水晶报表! 解决把水晶报表下载到客户端过程中,出现下载整个页面(.aspx)或者直接载web页中打开word文件的问题! 收获!关于引用计数器! 把文件或图片存在数据库中! 水晶报表倒出! 关于(学习!Excel)的问题。 解决问题总结 水晶报表操作中遇到的问题 javascript 打印报表!
javascript 学习
wngwz · 2004-09-07 · via 博客园 - wngwz

弹出模态窗体,并回传数值!
窗体:WebForm1.aspx; frame.aspx; WebForm2.aspx
WebForm1.aspx 窗体的Load事件中

if ( !IsPostBack)
{
    Button1.Attributes.Add(
"onclick","GetString(TextBox1)");
}

前台的javascript脚本:

function GetString(keys)
{
    keys.value 
= window.showModalDialog("frame.aspx?url=WebForm2.aspx");
}

frame.aspx 窗体的Load事件中

if(!IsPostBack)
{
    
if(Request.QueryString.Count >= 2//获得包含在传递字符串中健值对的个数。
    {
        
string Rurl = Request.QueryString["url"].ToString();
        
string paraname = Request.QueryString.GetKey(1);
        
string paravalue = Request.QueryString.Get(1);
        
string url = Rurl+"?"+paraname+"="+paravalue;
        
for(int i=2;i<Request.QueryString.Count;i++)
        
{
            url 
= url+"&"+Request.QueryString.GetKey(i)+"="+Request.QueryString.Get(i);
        }

        fraMultiSelect.Attributes.Add(
"src",url);
    }

    
else
    
{
        
//当通过WebForm1.aspx进入WebForm2.aspx时,首先要先经过这个框架窗体,才可以

        
string url = Request.QueryString["url"].ToString();
        fraMultiSelect.Attributes.Add(
"src",url);
    }

}

在前台添加

<iframe id="fraMultiSelect" width="100%" height="100%" frameborder="0" scrolling="no" runat="server"></iframe>

WebForm2.aspx

private void Button1_Click(object sender, System.EventArgs e)
{
    Response.Write(
"<script language='javascript'>");
    Response.Write(
"window.returnValue = '"+TextBox1.Text+"';");
    Response.Write(
"window.close();");
    Response.Write(
"</script>");
}