Chapter 2. Using Profiles

In This Chapter

Enabling anonymous and authenticated profiles

Storing and retrieving user preferences

Configuring default and custom providers

Querying and maintaining the profile database

People love to customize their environment. Even where there are rows of look-alike houses, the interiors all look different. Our tastes and preferences lead us to put an individual stamp on whatever we can control. You only have to look at a few Windows desktops to see examples of personalization in the computer world — a vast range of fonts, wallpapers, sounds, and other settings.

We expect our customizations in Windows or on the Web to remain the way we left them until we change the settings. This is persistence in geek-speak. When you return to an e-commerce Web site after lunch, you’d like it to recognize the items you put into your shopping cart before you went to eat. Those choices must be stored somewhere.

ASP.NET 2.0 provides a substantial infrastructure that supports tracking data on an individual basis for many scenarios: Visitors to your Web site can customize the appearance of the pages; shoppers don’t have to start over if they accidentally close the browser; the site can pre-fill form data such as a shipping address because the user provided it on the last visit. As you see in this chapter, it’s remarkably easy to do.

Understanding Profiles

ASP.NET’s default profile functions store visitors’ information in a SQL Server 2005 database. The great bonus is that ...

Get ASP.NET 2.0 All-In-One Desk Reference For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.