Example #1
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                Users u = new Users();
                string s=u.Login(ConfigurationManager.ConnectionStrings["connString"].ConnectionString,txtUsername.Text,txtPassword.Text);

                if (s=="success")
                {
                    Session["uid"] = u.userid;
                    Session["uname"] = u.userName;
                    Session["isAdmin"] = u.isAdmin;
                    Response.Redirect("~/Default.aspx");
                }
                else
                {
                    lblResult.Text = s;
                }
            }
        }
 public void Remove(Users user)
 {
     Collection.Remove(user);
 }
 public void Remove(Users user)
 {
     Collection.Remove(user);
 }
 public void Add(Users user)
 {
     Collection.Add(user);
 }
 public void Add(Users user)
 {
     Collection.Add(user);
 }