Hello experts
i have a login page whereby a session is created..if the admin logs in, it will be directted to addproduct.aspx and if a user login, it will direct to home.aspx...now to prevent users from seeing other pages without login i used the following code on all the pages
If (Session("Admin") Is Nothing) Then
Response.Redirect("login.a
spx")
End If
If (Session("User") Is Nothing) Then
Response.Redirect("login.a
spx")
End If
Therefore once log in, the user is directed to home.aspx or addproduct.aspx ...now here is my problem, once logged in, if ever login.aspx is typed in the address bar, it directs the user to the page, even though the latter is already logged in...any solution for this??/ it tried to use
If not (Session("Admin") Is Nothing) Then
Response.Redirect("addprod
uct.aspx")
End If
If not (Session("User") Is Nothing) Then
Response.Redirect("home.as
px")
End If
on the login.aspx form load but it doesnt work
any suggestion please