protected void Page_Load(object sender, EventArgs e)
        {
            ClientScript.GetPostBackEventReference(this, string.Empty);
            if (!Page.IsPostBack)
            {
                v = new LoginValidator(new User(), false);
            }

            string target = Request["__EVENTTARGET"];

            if (target == "btnRegister")
            {
                v = new AccountValidator(new App_Code.User());
                btnRegister_Click(sender, e);
            }
            else if (target == "btnLogin")
            {
                v = new LoginValidator(new User(), false);
                btnLogin_Click(sender, e);
            }
            else
            {
                v = new LoginValidator(new App_Code.User(), false);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty((string)Session["Username"]))
            {
                Debug.WriteLine("Session is empty");
            }

            if (txtUsername.Text != string.Empty)
            {
                Session["Username"] = txtUsername.Text;
            }

            v = new AccountValidator(user);
        }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     v = new LoginValidator(new User(), false);
 }