Http弹出框后跳转到另外的页面

来源:互联网 发布:大片下载软件 编辑:程序博客网 时间:2024/05/01 00:48

HttpContext.Current.Response.Write("<script>alert('已退出');window.location.href ='login.aspx';</script>");

 

 

或者

 

 

    public static void MsgToUrl(string msg, string url)

    {

        HttpContext.Current.Response.Write("<script>alert('" + msg + "');window.location.href ='" + url + "';</script>");

    }

 

 

调用

 

            CommonOperation.MsgToUrl("未登录", "login.aspx");

注:CommonOperation类名。

 

原创粉丝点击