您的位置:程序门 -> .net技术 -> c#



为何用showmodaldialog打开对话框后,在对话框中提交页面会打开新的页面?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


为何用showmodaldialog打开对话框后,在对话框中提交页面会打开新的页面?[已结贴,结贴人:crossrowman]
发表于:2007-03-23 09:50:48 楼主
打开对话框的脚本如下:
function   changepassword(id)
{
window.showmodaldialog( 'setuserpassword.aspx?id= '+   id, ' ',   'dialogwidth:280px;dialogheight:300px;center:yes;resizable:no;help:no;resizable:no;status:no;scrollbar:no '   );
}
发表于:2007-03-23 09:52:281楼 得分:5
openwindow
发表于:2007-03-23 09:54:102楼 得分:0
用openwindow还是一样的   还是打开新页面
发表于:2007-03-23 09:54:133楼 得分:60
在记得是要加   target=_self
发表于:2007-03-23 09:54:254楼 得分:5
用框架可以实现,
发表于:2007-03-23 09:55:585楼 得分:0
<base   target= "_self ">
在新窗口head里加
发表于:2007-03-23 09:57:566楼 得分:0
<head>
<title> 设置用户密码 </title>
<base   target= "_self ">
                  </head>

这样?结果还是一样的
发表于:2007-03-23 10:02:497楼 得分:20
function   changepassword(id)
{
window.showmodaldialog( 'setuserpasswordfrm.aspx?id= '+   id, ' ',   'dialogwidth:280px;dialogheight:300px;center:yes;resizable:no;help:no;resizable:no;status:no;scrollbar:no '   );
}
这个需要你打开的窗口   必须被包含在一个框架内(setuserpasswordfrm.aspx)
<html>
<head>
        <title> 无标题页 </title>
</head>
        <frameset   rows= "0,* "   frameborder= "no "   border= "0 "   framespacing= "0 ">
        <frame   src= "about:blank "   scrolling= "no "   noresize>
        <frame   src= "setuserpassword.aspx?id= <%=m_cid   %> "   scrolling= "yes "   noresize>
        </frameset>
</html>
m_cid   在.cs中定义
protected   string   m_cid   =   string.empty;
page_load中
m_cid   =   request[ "id "];
发表于:2007-03-23 10:03:378楼 得分:0
搞定了

<base   target= "_top ">
谢谢
发表于:2007-03-23 10:03:569楼 得分:10
<head   base   target= "_self "> </head>
发表于:2007-03-23 10:05:4010楼 得分:0
ls错了
发表于:2007-03-23 10:07:4611楼 得分:0
target= "_top "
慢了~~


快速检索

最新资讯
热门点击