Personalization allows the user to modify your site to reflect his or her own tastes. It also allows you to keep track of the user's "progress" through a sequence of steps or selections made on a page from one visit to another. Many sites use personalization to create persistent "wish lists," "shopping carts," and so forth.
This used to be a huge and complicated job—keeping track of a user's set of preferences and the state of a user's personal information. Fortunately, that is all made easier now with ASP.NET 2.0.
Copy the previous example, SecurityRoles, to a new web site called SitePersonalization. Set Welcome.aspx as the start page and run it to make sure everything still works.
One of the easiest ways to personalize a site is to define profile information that you will maintain for each user. Profile information can include such simple data as the user's real name, address, and telephone numbers, or, as you'll see later, it can include more complex user-defined data.
To use profiles, you have to make some modifications to your
web.config file for the project. The first step is
adding a new section called
<profile>, setting the enabled property to
true, and specifying
defaultProvider property holds the data for the profiles;
AspNetSqlProfileProvider is the built-in provider for
Then you need to modify web.config to indicate which
pieces of profile information to save. You add a