now wat if i want to remember my password.
lets say,i login a site with "keep me logged in" checked (ie a cookie is created) with a months expiry time,And i close the browser without logout.Now in this case i need to delete the cookies on browser close rt ??
public static void Login(HttpResponse response, string username,
bool rememberMeChecked)
{
DateTime expiration = DateTime.Now.AddMonths(1);
if (rememberMeChecked)
{
expiration = DateTime.Now.AddMonths(1);
}
FormsAuthentication.Initialize();
FormsAuthenticationTicket tkt = new FormsAuthenticationTicket(1, username,
DateTime.Now, expiration, rememberMeChecked,
FormsAuthentication.FormsCookiePath);
HttpCookie ck = new HttpCookie(FormsAuthentication.FormsCookieName,
FormsAuthentication.Encrypt(tkt));
ck.Path = FormsAuthenticat ...
Go to the complete details ...