if (CookiesHelper.GetCookieValue("UserCroupID") == null ||CookiesHelper.GetCookieValue("UserCroupID") == "")
            {
                Response.Write("<script>alert('请您先登陆');</script>");                Server.Transfer("KMSLogin.aspx", true);
            }各位大哥 我在KMSPWD 页面 做了一个判断 如果 他没有登录 就让他先登录 
if (!IsPostBack)
        {
            
            if (CookiesHelper.GetCookieValue("usercheck")=="1")
               this.CheckBoxzhu.Checked = true;
            else
               this.CheckBoxzhu.Checked = false;
            this.TxtName.Text = CookiesHelper.GetCookieValue("usercode");            this.TxtPwd.Attributes["value"] = CookiesHelper.GetCookieValue("userpassword");
          }
这是我 登录界面的代码 为什么下次我登录的时候 Cookies保留了   
跳转页面的时候  CookiesHelper.SetCookie("UserCroupID", dt.Rows[0]["UserGroup_ID"].ToString());
我把Cookies 传过去了  为什么 那边页面 没有获取到了求解为什么  很急急

解决方案 »

  1.   

    首先LZ要明白 (!IsPostBack) 是什么意思要判断是否登录,不应该放在if (!IsPostBack)里面吧
      

  2.   

    还有Cookies是保存在客户端的,浏览器是否支持Cookies呢?
      

  3.   

    那是因为你使用了 Server.Transfer。使用 Response.Redirect。
      

  4.   

    那是因为你使用了 Server.Transfer。使用 Response.Redirect。
    大哥  有点不行 能不能在想帮小弟想点别的办法 谢谢了
      

  5.   

    没有的 他说的是假的  我试过了 没用Server.Transfer。使用 Response.Redirect。