Hi, Does anybody know if the Rememeber Login Check box of the Issue tracker application works? because I checked the Rememeber Login option, logout and login again, it doesn't seems to work. I added the code below to the desktopdefault.aspx page but it doesn't
work either. Please let me know if I am missing something. THanks private void Page_Load(object sender, System.EventArgs e) { if ( Response.Cookies ["USERID"].Value !=null ) { txtUsername.Text =Response.Cookies ["USERID"].Value; chkRemember.Checked = true;
} } //- LOGIN METHOD void Login(Object s, EventArgs e) { .... FormsAuthentication.SetAuthCookie(txtUsername.Text, chkRemember.Checked); if (chkRemember.Checked) { Response.Cookies ["USERID"].Value = txtUsername.Text; Response.Cookies ["USERID"].Path = "/";
Response.Cookies ["USERID"].Expires = DateTime.Now.AddMonths(1); } }
Hi! I was similarly confused by the text "Remember Login" - it is really a "Keep me logged in. Remove your code, rebuild, run, and login with it checked. Then close the browser without logging out. Run again - you are still logged in (for the duration set in
global.asax.vb). HTH, Scott
Thanks for the answer. Scott, Do you know how to do the "Remember Login" i.eautomatically fill in the userName text box everytime the user got to the website. I would think I just have to write it in a cookie but it doesn't seems to work. Thanks
FormsAuthentication destroys that info on SignOut. You just need to add the info (say, user name) to the cookie separate from the authentication ticket. Take a look at the code-behind for DisplayIssues.ascx where the column selection is preserved. You'll basically
add a global constant, then write and read the user name in DefaultDesktop. Have fun! Scott
None
0 Points
38 Posts
Remember login question
Feb 01, 2005 10:06 AM|dotnetuser2004|LINK
None
0 Points
8 Posts
Re: Remember login question
Feb 01, 2005 10:34 PM|Scotteb|LINK
None
0 Points
38 Posts
Re: Remember login question
Feb 02, 2005 10:33 AM|dotnetuser2004|LINK
None
0 Points
8 Posts
Re: Remember login question
Feb 04, 2005 10:26 PM|Scotteb|LINK