.net弹出模式窗口,关闭后刷新父窗口
A.aspx 里有个repeater 每行后面有个查看详情的按钮
<a title="查看详细信息.." href="#" id='<%#Eval("T_UserID") %>' class="GetMes">
<img src="Images/LookMes.gif" />
</a>
点击按钮弹出一个模式窗口GetMoreMes.aspx 我用的showModalDialog
js代码
$(".GetMes").click(function() { if ($.trim($(this).attr("id")).length > 0) { window.showModalDialog("GetMoreMes.aspx?UID=" + $(this).attr("id"),"window","dialogwidth:710px;dialogheight:500px;center=yes;resizable:yes;help=no;status=no;"); } })
protected void BtnSaveWorkInfo_Click(object sender, EventArgs e) { 。。。。。。。。。。。。。。。。 。。。。。。。。。。。。。。。。。。。。 StringBuilder scriptString = new StringBuilder(); scriptString.Append("<script language = javascript>"); scriptString.Append(" window.close(); "); scriptString.Append("</" + "script>"); Response.Write(scriptString.ToString()); }