So I have a simple log-in form. This is what I have coded in in the code behind using C#:
string user = txtUserName.Text.Trim();
string pwd = txtPassword.Text;
DataTable dt = new DataTable();
using (SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["DBConnectionString"].ConnectionString))
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
// cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "SELECT username, password FROM member WHERE username='" + user + "' AND password='" + pwd + "' ";
con.Open();
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Session.Add("Username", ...
Go to the complete details ...