try { SqlConnection con = new SqlConnection(@"Data Source=LENOVO-41B3F2CE\SQLEXPRESS;Initial Catalog=IMS;Integrated Security=True;Pooling=False"); string query = "SELECT [user].* FROM [user] where u_name='" + txtusername.Text + "' and pwd='" + txtpassword.Text + "'"; SqlCommand com = new SqlCommand(query, con); con.Open(); if (com.ExecuteReader().HasRows) { //if ((txtusername.Text = "admin") && (txtpassword.Text = "admin")) { Response.Redirect("allinventory.aspx"); Label3.Text = "successfully"; } } else { Label3.Text = "not successfully"; txtusername.Text = ""; txtpassword.Text = ""; } con.Close(); } catch (Exception ex) { Console.Write("" + ex.Message); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)