This class implements the logic required to carry out lower-level personalization operations. Although the WebPartManager class manages the high-level life cycle of personalization, it is the WebPartPersonalization class that is responsible for actually implementing the physical steps necessary to carry out specific personalization actions. The WebPartPersonalization class in turn relies on an implementation of PersonalizationProvider to communicate with the underlying data store for personalization information.
If you use the default implementation of the WebPartManager, it creates an instance of the WebPartPersonalization class that you can use by referencing the Personalization property. For example, to access the InitialScope property, you would specify WebPartManager.Personalization.InitialScope.
Notes to Inheritors
The
WebPartPersonalization class works closely with a
WebPartManager control and the rest of the personalization infrastructure. The default implementation of personalization is a very robust subsystem that should meet your personalization needs. In most cases, if you want to customize personalization, you can create a data provider for use as a personalization provider by creating a class that inherits from
PersonalizationProvider.
If you want to create a personalization subsystem significantly different from that provided by the
WebPartPersonalization and the
WebPartManager classes, you should create a custom
WebPartPersonalization implementation by deriving from
WebPartPersonalization and add your own custom logic. Then create a custom
WebPartManager implementation by deriving from
WebPartManager, add your own custom logic, and override the
CreatePersonalization method to return your custom
WebPartPersonalization implementation. Because a
WebPartManager control makes requests to the personalization infrastructure by way of a
WebPartPersonalization instance, the
WebPartManager control does not directly interact with or hold references to
PersonalizationProvider implementations.