JavaScript Editor jscript editor     Web designer 



Main Page

This walkthrough is a hands-on demonstration of how to create an ASP.NET user control that relies on Web Parts personalization to provide user-specific default values on a Web page.

The ASP.NET Web Parts control set enables you to build Web pages with modular layouts in which users can modify the appearance and content to suit their preferences. A key Web Parts feature, known as personalization, lets you save user-specific settings for each page and reuse those settings in future browser sessions.

Using Web Parts and personalization, you can build Web pages that include a feature useful for many Web applications: the ability to supply user-specific default values in a form. This walkthrough demonstrates how to supply user-specific default values by implementing a user control that can be treated as a personalizable Web Parts control. This development approach could be useful if you were creating, for example, an application for customer service agents to fill out online forms. The Web Parts and personalization capabilities enable your page to recognize each agent. The user control allows each agent to save default values for the fields on the form, and then the default values can be automatically filled in on subsequent visits to the page.

NoteNote

The user control you create in this walkthrough does not inherit from the WebPart class. But in this walkthrough you learn that a user control can function as a WebPart control. During the walkthrough you add the user control to a WebPartZoneBase zone. Doing so allows ASP.NET to wrap the user control in a GenericWebPart control. The user control will then work like any other WebPart control, and will allow you to explore personalization.

During this walkthrough, you will learn how to:

NoteNote

This type of application could be developed using ASP.NET profiles. However, in this case you are not storing information about the user to be reused across an entire application, as in a shopping cart application. Instead, you are saving user-specific preferences or settings for each control, on a per-page basis. For more information about profiles, see ASP.NET Profile Properties Overview.

Expand imagePrerequisites

Expand imageCreating a Personalizable User Control

Expand imageReferencing the User Control as a Web Parts Control

Expand imageNext Steps

Expand imageSee Also



JavaScript Editor jscript editor     Web designer