Alv45525 0 Light Poster

helo guys...i have a table in sql server express edition and 3 fields in it,
UserID, Password and Role.
I managed to create my login but now i want to add some piece of code in order to give acces according to the role field..that is admin and user will have different priviledges.

Dim txtcontent As String
        Dim logCon As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True")

        txtcontent = Me.txt1.Text

        Dim LogCmd As New SqlCommand("select * from Security where UserID='" & txtcontent & "'", logCon)
        logCon.Open()

        Dim rdr As SqlDataReader = LogCmd.ExecuteReader
        If rdr.Read Then

            Dim p As String = rdr(1)
            Dim UserRole As String
            If txt2.Text = p Then
[QUOTE]i suppose that the piece f code should be written here but i have no idea about how to do it[/QUOTE]


                Response.Redirect("home.aspx")

            Else
                MsgBox(" Invalid Password!! Please try again ")
                txt2.Text = ""
                txt2.Focus()
            End If

        Else
            MsgBox(" Invalid Username!! Please try again ")

            txt1.Text = ""
            txt2.Text = ""
            txt1.Focus()
        End If

        logCon.Close()

anyone can help plz