Hi,
I have a login page. Once a user is authenticated they are redirected to another page, (called pg2). I don't want just anyone typing in the url and getting to pg2. If they are not authenticated I want them to redirect to login.aspx. To achieve this, I'm using this code below. But it's not working. I am using a nested master page and I don't know if this is causing the problem. Can anyone help?
Thanks.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim session_username As String = Session("username_session")
If Not String.IsNullOrEmpty(session_username) Then
Response.Redirect("login.aspx")
End If I've also tried this:Protected Sub Page_Lo ...
Go to the complete details ...