string username = loginDetails.UserName; string pwd = loginDetails.Password; string s; s = WebConfigurationManager.ConnectionStrings["ConnString"].ConnectionString; SqlConnection con = new SqlConnection(s); con.Open(); string sqlUserName; sqlUserName = "SELECT * FROM ADMINISTRATOR WHERE Admin_Username ='" + username + "' AND Admin_Password ='" + pwd + "'"; SqlCommand cmd = new SqlCommand(sqlUserName, con); string CurrentName; CurrentName = (string)cmd.ExecuteScalar(); if (CurrentName != null) { Session["UserAuthentication"] = username; Session.Timeout = 1; Response.Redirect("~/Admin/Default.aspx"); } else { Session["UserAuthentication"] = ""; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)