Asp.net中的两种刷新父窗体方法

第一种:
btn_export.Attributes.Add("onclick","javascript:showModalDialog('listprintselect.aspx',parent,'dialogWidth:300px;dialogHeight:130px;center:yes;help:no;resizable:no;status:no');

调用window.dialogArguments.location.reload()
如果有框架,则window.dialogArguments.FrameId.location.reload(),就可以了.


第二种:
btn_export.Attributes.Add ("ondblclick""javascript:var sret;sret=showModalDialog('shippercontent.aspx?id="+itemid+"&rdid="+ Rdid +"',parent,'dialogWidth:640px;dialogHeight:500px;center:yes;help:no;resizable:no;status:no');

如果返回值为“aa“,则刷新
if(sret=='aa')
{window.location.reload();}

模式窗口里面调用
Page.RegisterStartupScript("","<script language='javascript'>window.returnValue='aa';window.close();

传递一个返回值“aa“给父窗体
posted @ 2006-09-18 11:47  柴火  阅读(1349)  评论(0编辑  收藏  举报