Επεξεργασία

Κοινή χρήση μέσω


WebPartPersonalization.HasPersonalizationState Property

Definition

Returns a value indicating whether the current page and personalization scope have associated personalization data.

public:
 virtual property bool HasPersonalizationState { bool get(); };
[System.ComponentModel.Browsable(false)]
public virtual bool HasPersonalizationState { get; }
[<System.ComponentModel.Browsable(false)>]
member this.HasPersonalizationState : bool
Public Overridable ReadOnly Property HasPersonalizationState As Boolean

Property Value

true if the page has personalization data associated with it; otherwise, false.

Attributes

Exceptions

There is no personalization provider associated with the WebPartPersonalization instance. This can occur if the property is accessed prior to the completion of the associated WebPartManager control's OnInit(EventArgs) method.

-or-

The value of the Page property for the associated WebPartManager is null.

-or-

The value of the Request property on the WebPartManager control's associated Page instance is null.

Remarks

This is a convenient method for determining whether the current page and scope combination has personalization data associated with it. Internally, the method calls GetCountOfState on the provider to determine whether data exists.

Applies to

See also