Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SqlConnection connection = new SqlConnection(@"Data Source = SQL2016.fse.network;Initial Catalog=db_1620708_webuser;Persist Security Info=True; User ID =user_db_1620708_webuser; Password=Chester1991");
- connection.Open();
- SqlCommand cmd = new SqlCommand("select count (*) from webusers where Username ='" + TextUsername + "' and Password = '" + txtPassword + "'");
- cmd.Connection = connection;
- int M = Convert.ToInt32(cmd.ExecuteScalar());
- if (M > 0)
- {
- Response.Redirect("Default.aspx");
- }
- else
- {
- lBLInvalid.Visible = true;
- lBLInvalid.Text = "Invalid Username and Password";
- connection.Close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement