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

If i do logout then i can not open it without login again please tell me code for this in asp.net

Posted
Updated 28-Aug-13 23:59pm
v2

 
Share this answer
 
create your session during login.

Session["Login"] = textbox1.text;


afterLogin write a code
on pageload event

if(Session{"Login"] == null)
{
responce.redirect("you login page here");
}

at logout event Set your session null before you can logout from the application.

Session["Login"] = null;
 
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