Admin (lowercase): User-entered account.
Password (lowercase): The password entered by the user.
1, the first user name and password, stored in session sessions.
session["admin" = admin; session["Password"] = Password;
2.
· Then in the background, in the loading event to determine whether the session is not afraid, and is not the correct account and password.
· It is not just an interface in the background to verify, all the background interface, as long as necessary, can be verified in this format.
Account password is either missing or incorrect, jump to login interface, re-login if (session["Admin"] = = NULL | | session["PassWord"] = = NULL | | session["Admin"]. ToString ()! = Admin | | session["PassWord"]. ToString ()! = password) { //Show background page}else{ Response.Redirect ("... /admin/login.aspx ");}
Net-(Session) Background login, the judge is not already logged in, if not, jump back to landing page