قمت بعمل مشروع ASP.net و اردت عمل حماية و دخول الأعضاء الذى لديهم كلمة سر فقمت بتعديل الــ WEB.CONFIG
<authentication mode="Forms" >
<forms loginUrl="Login.aspx" >
</forms>
</authentication>
<authorization>
<deny users="?" /> <!-- Allow all users -->
و قمت بكتابة الكود التالى فى الصفحة الرئيسية
Dim con As New SqlConnection
con.ConnectionString = "server=yasser;database=yasser;Trusted_Connection=yes"
Dim cmd As New SqlCommand
cmd.Connection = con
cmd.CommandType = CommandType.Text
cmd.CommandText = "select email from users where email='" & TextBox1.Text.ToString & " and password ='" & TextBox2.Text.ToString & ""
Dim checkread As SqlDataReader
con.Open()
While checkread.Read
Response.Redirect("welcome.aspx")
End While
المشكلة ان عندما احاول الدخول عن طريق كلمة سر صحيحة لا يدخل و يظل كما هو على صفحة الدخول و لا يتم نقل المستخدم الى الصفحة التالية
شكرا للمساعدة
