FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, "abc", DateTime.Now, DateTime.Now.AddMinutes(30), false, "1", FormsAuthentication.FormsCookiePath); string hash = FormsAuthentication.Encrypt(ticket); HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, hash); if (ticket.IsPersistent) { cookie.Expires = ticket.Expiration; } Response.Cookies.Add(cookie);
If I click again on log-in button or any other control or refresh the page than "LoginView" control along with other control "LoginStatus" and "LoginName" work fine and recognize as Logged-In User. So, Is there an way just after login button press "LoginView" work fine.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)