62,268
社区成员
发帖
与我相关
我的任务
分享// 登陆正确
if (user != null)
{
this.UserInfoCache = user;
// 经理
if (this.UserInfoCache.RoleId == 1)
{
FormsAuthentication.RedirectFromLoginPage("manager", false);
}
// 总公司经理
else if (this.UserInfoCache.RoleId.Equals(3))
{
FormsAuthentication.RedirectFromLoginPage("admin", false);
}
// 职员
else
{
FormsAuthentication.RedirectFromLoginPage("user", false);
}
}<location path="UserManage.aspx">
<system.web>
<authorization>
<allow users="admin"/>
<deny users="*"/>
</authorization>
</system.web>
</location>