User control problem

Reply

Join Date: Mar 2008
Posts: 324
Reputation: sonia sardana has a little shameless behaviour in the past 
Solved Threads: 7
sonia sardana sonia sardana is offline Offline
Posting Whiz

User control problem

 
0
  #1
Oct 16th, 2009
  1. protected void btnLogin_Click(object sender, EventArgs e)
  2. {
  3. try
  4. {
  5. SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
  6. SqlCommand cmd = new SqlCommand("SELECT * FROM UserLogin", conn);
  7. conn.Open();
  8. SqlDataReader dr = cmd.ExecuteReader();
  9. while (dr.Read())
  10. {
  11. if (txtUserName.Text == dr[0].ToString())
  12. {
  13. if (txtPassword.Text == dr[1].ToString())
  14. {
  15. Response.Redirect("FrmLogin.aspx");
  16. }
  17. else
  18. {
  19. lblError.Text = "UserName & Password do not match";
  20. }
  21. }
  22. else
  23. {
  24. lblError.Text = "UserName & Password do not match";
  25. }
  26. }
  27. }
  28.  
  29. catch (Exception ex)
  30. {
  31. Response.Write(ex.Message.ToString());
  32. }
  33. }
I call user control in Frmlogin.aspx page. First time i run the form,it runs.Now when i runs the Frmlogin.aspx page error is there
Disassembly cannot be displayed. The expression has not yet been translated to native machine code.


Wats dis error means?Can u tell me?
Reply With Quote Quick reply to this message  
Reply

Message:




Views: 209 | Replies: 0
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC