SyntaxFix
Write A Post
Hire A Developer
Questions
userCookie.Expires.AddDays(365);
This line of code doesn't do anything. It is the equivalent of:
DateTime temp = userCookie.Expires.AddDays(365); //do nothing with temp
You probably want
userCookie.Expires = DateTime.Now.AddDays(365);