if(HttpContext.Current.User.Identity.IsAuthenticated)
{
Response.Write("已登录")
}
else
{
Response.Write("未登录")
}
当点击退出,执行“FormsAuthentication.SignOut()”,回到原页面仍显示“已登录”
{
Response.Write("已登录")
}
else
{
Response.Write("未登录")
}
当点击退出,执行“FormsAuthentication.SignOut()”,回到原页面仍显示“已登录”
登录的这里是这样吗?
但和你上面的稍稍有点区别,我加了“角色”
FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(1,UserName,DateTime.Now,DateTime.Now.AddMinutes(60),false,Roles);
{这段代码是一个页面吗?
您的经营之道 http://info.7ecity.com/