c# - asp.net Login database -


Hi IM is a problem when trying to log in to my website. I want it to display the proper message when I keep getting in the same message "email is not correct" but will anyone be able to help me?

  Secure void loginbutton_click (Object Sender, EventArgs e) {SqlConnection con = new SqlConnection (ConfigurationManager.ConnectionStrings ["RegConnectionString"] ConnectionString). Con.Open (); String Checker = "Select the number from the user where email = '" + loginmail. Text + ";"; SqlCommand Com = New SQL Commands (Checksier, Conn.); int temp = convert.ToInt32 (com.ExecuteScalar (.) ToString ()); Con.Close (); If (temp == 1) {con.Open (); String check password word = "Choose password from user where email = '" + loginmail. Text + ";"; SqlCommand pass = new SqlCommand (checkPasswordQuery, con); String password = pass.ExecuteScalar (). ToString (); If (password == loginpassword.Text) {session ["new"] = loginmail Text; reaction. Type ("password is correct"); Response.Redirect ("Admin.aspx"); } else {Response.Write ("password is not correct"); }} else {Response.Write ("Email is not correct"); }}    

There is a place next to your email:

  where email = '"+ log ...   

to highlight it:

  where email =' [an empty place here I have a need to change this:  
  string checksuser = "count (*) Choose user from" log = ...   

Where email = '"+ loginmail Text + ";";

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -