Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["TenDN"] != null)
         {
             Response.Redirect("~/index.aspx");
         }
         if (Request.Cookies["Luu"] != null)
         {
             HttpCookie cookie = Request.Cookies.Get("TenDNandPass");
             txtTen.Text     = XLDL.GiaiMa(cookie.Values["TenDN"].ToString());
             txtMatkhau.Text = XLDL.GiaiMa(cookie.Values["Pass"].ToString());
             cbLuu.Checked   = true;
         }
         if (Request.UrlReferrer != null)
         {
             if (Request.UrlReferrer.ToString() == XLDL.urlDangKy)
             {
                 Session["url"] = "index.aspx";
             }
             else
             {
                 Session["url"] = Request.UrlReferrer.ToString();
             }
         }
         else
         {
             Session["url"] = "index.aspx";
         }
         if (Session["GHtoDN"] != null && Session["Giohang"] != null)
         {
             Label1.Visible    = true;
             Session["GHtoDN"] = null;
         }
         else
         {
             Label1.Visible = false;
         }
     }
 }