c# - Secure Login Or Login check in asp.net -


i new in asp, here question have website pages home, about, contact, , login. in website user can login , access home page, on home page there grid view master page. problem user can access home page without login, edit path in address bar. example login page path is

http://lolhost:54515/mastergridvie/login.aspx 

and user edit it

http://localhost:54515/mastergridvie/home.aspx 

so user can go on home page without login, how can prevent this?

i know there use session, have no idea how , create session :( please can me?

create session in login page this.

session["userid"]="something"; 

and after check in every page load this.

if(session["userid"] == null) {   response.redirect("login.aspx"); } 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -