Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi!

i am using this line of code in the Page_Load method:

Page.RegisterClientScriptBlock("", "<script> if(history.length>0)history.go(+1);</script>");


Using this when i click logout button in my form, I go back to the login page and click back arrow button of web browser it display login page.

Thanks
Posted
Updated 24-Apr-10 4:55am
v3

1 solution

Hi,

That is not the right way to redirect users to the logon page. You should instead use Response.Redirect to redirect the users to the logon page.

Response.Redircet("logon.aspx");


However, for extra security, when the users click the logout line, you should take the user to a landing page, ask him to close all the browser windows and navigate to the home page of your application.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900