Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. protected void Page_Load(object sender, EventArgs e)
  2. {
  3.  
  4. }
  5.  
  6. protected void ButtonLogin_Click(object sender, EventArgs e)
  7. {
  8. string username = TextBoxUserName.Text;
  9. string password = TextBoxPassword.Text;
  10. ConfigurationManager.ConnectionStrings["connectionDatabas"].ToString();
  11.  
  12. UserSQL repos = new UserSQL();
  13. int userId = repos.UserFound(username, password);
  14. if (userId != -1)
  15. {
  16. Session["authenticated"] = true;
  17. Session["userid"] = userId;
  18. Session["cart"] = new Cart();
  19. Response.Redirect("Default.aspx");
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement