且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ASP.Net C#如何在通过登录进行身份验证后访问网站上的页面

更新时间:2021-12-30 21:35:20

您必须创建一个Session变量,并在PageLoad事件中检查该Session变量,如果没有,则重定向到登录页面......



如果你想提供访问角色,那么你也可以声明一个roleID并输入Session并检查角色......
You have to make a Session variable and in PageLoad event check for that Session variable and if not get then redirect to login page...

If you want to give access role then you can also declare a roleID and put in to Session and check for role also...