الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

ارجو المساعده فى عمل Login User Control

مغلق
بدأه yasserzaid في 6 يناير 2008 · 1 رد · 721 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

create a student database which have the following tables and thier relationship

1) Student table (StudentID , StudentName)

2) Course table (courseid,coursename)

3) Site User table(SiteUserID,UserName,Password,Type)

Task 1:

create a Login user Control

and handle the login of user if user in Admin type open AdminPage.aspx and if in Student type open StudentPage.aspx

Yasser Zaid

Web Developer

My Blog

Telecome Egypt

#2

in event button_click (login button)

Dim DBCon As New SqlConnection("........")

DBCon.Open()

Dim tempTable As New DataTable

Dim selectSQL As String

selectSQL = "select * From Site_User Where SiteUserID='" & txtUserID.Text & "' and

UserPassword='" & txtUserPassword.Text & "'"

Dim myDA As New SqlDataAdapter(selectSQL, DBCon)

myDA.Fill(tempTable)

If (tempTable.Rows.Count <> 0) Then

if temptable.rows(0)(3).tostring = "Admin" then

Response.Redirect("AdminPage.aspx")

else

Response.Redirect("studentPage.aspx")

end if

Else

Alert_Msg("Invalid User ID or Password", Page)

txtUserID.Text = ""

txtUserPassword.Text = ""

txtUserID.Focus()

end if

أتمنى أن أكون قد اجبتك على سؤالك

هذا الموضوع مغلق.

مواضيع مشابهة