Default page code

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

What code I need on the default page to call login page if the current user
is not authenticated/loggedin and carry on if the user is
authenticated/loggedin?

Thanks

Regards
 
It all looks quite complicated. I guess my needs are much simpler for the
form authentication method that I am using. I am using the following code in
Page_Load in of Default.aspx.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
If not User.Identity.IsAuthenticated Then
' Call login.aspx, how?
End If
End Sub

I just need to know if the current user in not authenticated how should I
call the login page? Am I on the right lines?

Thanks

Regards
 
Back
Top