关闭框架页面
if(Page.IsPostBack)
{
}
else
{
this.btnZX.Attributes.Add("onclick","return confirm('您确定要注销系统吗?')");
this.btnClose.Attributes.Add("onclick","return confirm('您确定要退出系统吗?')");
}
private void btnZX_Click(object sender, System.EventArgs e)
{
Session.Remove("userAdmin");
Response.Write("<script language=javascript>window.parent.opener=null;window.parent.close();window.open('login.aspx');</script>");
}
private void btnClose_Click(object sender, System.EventArgs e)
{
Session.Remove("userAdmin");
Response.Write("<script language=javascript>window.parent.opener=null;window.parent.close();</script>");
}
自已再加两个:
退出:parent.parent.close();
转到其他页:Response.Write("<script>parent.location.href='index.aspx';</script>");