Hi everyone,
In my web application I am using a structure like this
On my Login page:
Dim username As String
Dim password As String
Dim uid As String
Dim div As System.Data.DataView
div = CType(login.Select(DataSourceSelectArguments.Empty), System.Data.DataView)
If div.Count <> 0 Then
username = CType(div.Table.Rows(0)(0), String)
password = CType(div.Table.Rows(0)(1), String)
uid = CType(div.Table.Rows(0)(2), String)
If txt_user.Text = username And txt_pass.Text = password Then
Session.Add("s_username", username)
Session.Add("s_password", password)
Response.Redirect("http://www.mysite.com/admin.aspx")
End If
lbl_error.Visible = True
Else
lbl_error.Visible = True
End If
And on my Admin Page:
Dim session_username As [String] = TryCast(Session("s_username&q ...
Go to the complete details ...