close
// Reload 主頁面
private void ReloadPage()
{
if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "ReloadPage"))
{
string js = "window.opener.location.reload(true);";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ReloadPage", js, true);
}
}
//關閉自己
private void closeWindow()
{
string javascript;
string cname = "ReturnValue";
Type cstype = this.GetType();
ClientScriptManager cs = Page.ClientScript;
javascript = "<script>";
javascript = javascript + "window.close();";
javascript = javascript + "</script>";
if (!cs.IsStartupScriptRegistered(cname))
{
cs.RegisterStartupScript(cstype, cname, javascript);
}
}
private void ReloadPage()
{
if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "ReloadPage"))
{
string js = "window.opener.location.reload(true);";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ReloadPage", js, true);
}
}
//關閉自己
private void closeWindow()
{
string javascript;
string cname = "ReturnValue";
Type cstype = this.GetType();
ClientScriptManager cs = Page.ClientScript;
javascript = "<script>";
javascript = javascript + "window.close();";
javascript = javascript + "</script>";
if (!cs.IsStartupScriptRegistered(cname))
{
cs.RegisterStartupScript(cstype, cname, javascript);
}
}
全站熱搜
留言列表