Logout and back button problem
-
Hi frndz, i have one issue relating to loginI have 3 web forms Login page, home,and logout . for authenticating each page we check session value. Wen I login, keep user name in session["user"] and logo out I assign session["user"] ="" in the home page's load event i check if(session["user"] .tostring()=="" || session["user"] ==null) { response.redirect("login.aspx"); } esle { some functions.. } After logout if i press the back button of the browser i can come to home.aspx.it didnt check condition in the load event in the Home page what i do? --
All I ever wanted is what others have.... CrazySanker
-
Hi frndz, i have one issue relating to loginI have 3 web forms Login page, home,and logout . for authenticating each page we check session value. Wen I login, keep user name in session["user"] and logo out I assign session["user"] ="" in the home page's load event i check if(session["user"] .tostring()=="" || session["user"] ==null) { response.redirect("login.aspx"); } esle { some functions.. } After logout if i press the back button of the browser i can come to home.aspx.it didnt check condition in the load event in the Home page what i do? --
All I ever wanted is what others have.... CrazySanker
hi If you use browser back button, the page_load wont fire, because it just calls window.history.back() meaning that it goes to the last page visited. To avoid this you can have a button in your UI which on clicked goes to the home page and hence the Page_Load of it will fire. ~VSree
-
Hi frndz, i have one issue relating to loginI have 3 web forms Login page, home,and logout . for authenticating each page we check session value. Wen I login, keep user name in session["user"] and logo out I assign session["user"] ="" in the home page's load event i check if(session["user"] .tostring()=="" || session["user"] ==null) { response.redirect("login.aspx"); } esle { some functions.. } After logout if i press the back button of the browser i can come to home.aspx.it didnt check condition in the load event in the Home page what i do? --
All I ever wanted is what others have.... CrazySanker
-
Hi frndz, i have one issue relating to loginI have 3 web forms Login page, home,and logout . for authenticating each page we check session value. Wen I login, keep user name in session["user"] and logo out I assign session["user"] ="" in the home page's load event i check if(session["user"] .tostring()=="" || session["user"] ==null) { response.redirect("login.aspx"); } esle { some functions.. } After logout if i press the back button of the browser i can come to home.aspx.it didnt check condition in the load event in the Home page what i do? --
All I ever wanted is what others have.... CrazySanker
About about expiring pages?
Vasudevan Deepak Kumar Personal Homepage Tech Gossips