SqlConnection con = new SqlConnection(connection); SqlCommand com = new SqlCommand("Login_Validation",con); com.CommandType = CommandType.StoredProcedure; com.Parameters.AddWithValue("@username", txtBoxUserName)
<code>using (SqlDataReader reader = com.ExecuteReader(CommandBehavior.CloseConnection)) { if (reader.HasRows && reader.Read()) { String thePassword = reader[0].ToString(); } reader.Close(); }</code>
CommandObject.ExecuteScalar()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)