السلام عليكم عملت هذا الكود login
عاملين ديتا بيس خاصة للخريجين وكل خريج له password
عملنا الكود بس الكود ناقص مااعرف شو اللي ناقص فيه
لما ادخل اسم وادخل الباسوورد يطلع لي انه الرقم خطأ
اتمنى احد يصحح لي
هذا هو الكود
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["RegConnectionString"].ConnectionString);
con.Open();
string cadStr = "select count(*) from Registration where UserName=' " + TextBox3.Text + " ' ";
SqlCommand Checkuser = new SqlCommand(cadStr, con);
int temp = Convert.ToInt32(Checkuser.ExecuteScalar().ToString());
if (temp == 1)
{
string cadStr2 = "select password from Registration where UserName='" + TextBox3.Text + " ' ";
SqlCommand pass = new SqlCommand(cadStr2, con);
string password = pass.ExecuteScalar().ToString();
con.Close();
if (password == TextBox4.Text)
{
Session["New"] = TextBox3.Text;
Response.Redirect("secure.aspx");
}
else
Label1.Visible = true;
Label1.Text = "Invaild password...!!";
}
else
{
Label1.Visible = true;
Label1.Text = "Invaild UserName...!!";

