Redirect to login page if session("UserNa me") is expired when the page useraccount.asp x load event
My useraccount.asp x code :
The above code works correctly. but my question is the user enter the correct username and password in the login.aspx page . it will automatically redirect to previous page (useraccount.as px; useraccount.asp x is the sample name of the page but i have used the session redirect coding to many pages in my project).
My useraccount.asp x code :
Code:
If Session("UserName") Is Nothing Then Response.Redirect("../login/login.aspx") End If
Comment