【发布时间】:2014-11-03 12:46:08
【问题描述】:
public static string PopUpParentPage
{
get
{
if (HttpContext.Current.Session["PopUpParentPage"] == null)
{
return (string.Empty);
}
else
{
return (string)(HttpContext.Current.Session["PopUpParentPage"]);
}
}
set
{
HttpContext.Current.Session["PopUpParentPage"] = value;
}
}
上面的代码可以让我成为弹出窗口的父级。
下面是我如何从父窗口中的链接按钮单击事件打开弹出窗口
protected void lnkOpenPopUp_Click(object sender, ImageClickEventArgs e)
{
string strScript = "<script>fnChangeLocationPopup();</script>";
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "openPopup", strScript);
}
这也是我通过单击弹出页面上的按钮关闭弹出窗口的方式
protected void btnClosePopUp_Click(object sender, ImageClickEventArgs e)
{
string strScript = "<script>fnChangeLocationPopup();</script>";
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "closePopup", strScript);
}
现在我想要重新加载父页面,以便刷新数据。如果我知道在上面的第一个代码 sn-p 中检索的父页面 URL 的值,一旦弹出表单关闭,如何在 btnClosePopUp_Click 上刷新它?
【问题讨论】:
标签: javascript c# asp.net