How to store the userId and password in session and Killing the session?
-
Hi, After Logging-in how to store the UserId and Password in session.... If the user clicks the Back or Previous button from the browser tool bar then how to kill the session......? Please help me..... Thanking you Mcmilan.
mcmilan wrote:
After Logging-in how to store the UserId and Password in session....
Why do you want to store password in session? To store variable in session,
Session["MyKey"]=VariableName;
mcmilan wrote:
If the user clicks the Back or Previous button from the browser tool bar then how to kill the session......?
You can't. Onclick of browser Back or previous button,Just history of browser is change and content of page get back from cache memory.Page is not reloaded so you can not run code.
please don't forget to vote on the post that helped you.
-
Hi, After Logging-in how to store the UserId and Password in session.... If the user clicks the Back or Previous button from the browser tool bar then how to kill the session......? Please help me..... Thanking you Mcmilan.
If you put Session.Abandon(); in the page_load then that should do the trick. The only issue is that it will abandon the session everytime the user goes to that page. Not a big deal if it's on the Login page though. Hope this helps.
Cheers Disgyza Programmer Analyst
-
Hi, After Logging-in how to store the UserId and Password in session.... If the user clicks the Back or Previous button from the browser tool bar then how to kill the session......? Please help me..... Thanking you Mcmilan.
Session["UserId"]=txtuserid.text.trim(); To clear session Session.Abandon();