Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void Page_Load(object sender, EventArgs e)
- {
- }
- protected void ButtonLogin_Click(object sender, EventArgs e)
- {
- string username = TextBoxUserName.Text;
- string password = TextBoxPassword.Text;
- ConfigurationManager.ConnectionStrings["connectionDatabas"].ToString();
- UserSQL repos = new UserSQL();
- int userId = repos.UserFound(username, password);
- if (userId != -1)
- {
- Session["authenticated"] = true;
- Session["userid"] = userId;
- Session["cart"] = new Cart();
- Response.Redirect("Default.aspx");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement