WebPartPersonalization.ExtractPersonalizationState Method (WebPart)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Extracts personalization data from a Web Parts control when requested to do so by the parent WebPartManager control.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

protected internal virtual void ExtractPersonalizationState(
	WebPart webPart
)

Parameters

webPart
Type: System.Web.UI.WebControls.WebParts.WebPart

The Web Parts control containing personalization data to be extracted.

Exception Condition
ArgumentException

An attempt was made to extract personalization state from a Web Parts control that is not managed by the parent WebPartManager.

InvalidOperationException

An attempt was made to extract personalization state prior to the state being loaded from the underlying data store.

- or -

Personalization state has not been applied yet.

- or -

The ID of the WebPart has changed since personalization data was applied.

- or -

The personalization state returned from the data store was null.

If the IsEnabled property is set to true, and personalization state is not being reset during the page request (such as when the ShouldResetPersonalizationState property is false), then this method extracts personalization data from the Web Parts control specified by webPart. This method calls the ExtractWebPartPersonalization method on the PersonalizationState instance to extract personalization state from the supplied Web Parts control.

.NET Framework
Available since 2.0
Return to top
Show: