protected void lBtn_LogOut_Click(object sender, EventArgs e)
    {
        Session["User"] = null;
        JScript.Alert("成功注销");
        Response.Redirect(url);
    }    public static void Alert(string message)
    {
        string js = @"<Script language='JavaScript'>
                    alert('" + message + "');</Script>";
        HttpContext.Current.Response.Write(js);
    }当我点击注销按钮的时候,
Session["User"] = null;  //session清空了
JScript.Alert("成功注销");  //这一句没效果,没弹出提示框
Response.Redirect(url);  //跳转到url指向的页面求解答,谢谢

解决方案 »

  1.   

    Response.Redirect(url); 先执行了,转到其他页面去了,还执行什么啊
      

  2.   

    本帖最后由 net_lover 于 2011-01-19 12:53:12 编辑
      

  3.   

    恩,谢谢,我有个Alertto方法的    public static void Alertto(string message, string cometo)
        {
            string js = @"<Script language='JavaScript'>
                        alert('" + message + "');window.parent.location=' " + cometo + " ';</Script>";
            HttpContext.Current.Response.Write(js);
        }已解决。