登录

来源:互联网 发布:js怎么获取div的id 编辑:程序博客网 时间:2024/04/29 16:39

<authentication mode="Forms">
   <forms loginUrl="~/Login.aspx" timeout="60" name='mingcheng'/>
  </authentication>

退出

FormsAuthentication.SignOut();

登录

        System.Web.Security.FormsAuthentication.SetAuthCookie(userName, true);




            string username = HttpContext.Current.User.Identity.Name;