HttpCookie cookie;
cookie = FormsAuthentication.GetAuthCookie(W3Account, isRemberMe);
if (isRemberMe)
{
       cookie.Expires = System.DateTime.Now.AddDays(1);
}
HttpContext.Current.Response.Cookies.Add(cookie);
string targetUrl;
targetUrl = FormsAuthentication.GetRedirectUrl(W3Account, isRemberMe);
HttpContext.Current.Response.Redirect(targetUrl);

 

 posted on 2013-11-08 11:40  aweifly  阅读(461)  评论(0编辑  收藏  举报