O'Reilly logo

ASP.NET MVC 2 Cookbook by Richard Kimber, Andrew Siemer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Remembering a previous visitor

If you are the sort of developer that doesn't tend to use the profiles and membership facilities (for whatever reason...) provided by the .NET framework, then odds are that you will be making your registration process and logging-in facilities. Part of this is the ability to drop a cookie and remember the users when they come and go from your site. There are many approaches to this, some better than others. You could drop an encrypted cookie on the user's computer with the user's ID in it and, upon re-entering the site, you simply log them in and allow them to exist in the system, as if they hadn't left (as is done with Gmail). Another approach is to store their username and the like in a cookie and let the user ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required