Export (0) Print
Expand All

IPersonalizable Interface

Defines additional management capabilities for the application and extraction of personalization state.

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

type IPersonalizable =  interface end

The IPersonalizable type exposes the following members.

  NameDescription
Public propertyIsDirtyGets a value that indicates whether the custom data that a control manages has changed.
Top

  NameDescription
Public methodLoadLoads custom data into a control.
Public methodSaveSaves custom properties and internal state information in the control's PersonalizationDictionary object.
Top

In addition to using the Personalizable attribute on control properties, a control can also implement IPersonalizable for additional management capabilities for the application and extraction of personalization state. For example, controls that need to manage private state information should implement this interface. Controls that access personalized data through complex mechanisms, such as custom cache solutions, data persistence to mainframes, or XML Web services, should also implement this interface.

Important noteImportant

You should not add types based on classes defined in the App_Code directory and then depend on the default binary serialization mechanism. App_Code-based artifacts are not consistently binary-serializable due to the fact that they can have their assembly names changed at random points in time.

The following code example demonstrates how to use the IPersonalizable interface. The example consists of an .aspx page that references a Web Part control named UrlListWebPart. The following code is the .aspx file for the example.

No code example is currently available or this language may not be supported.

The following code is the source for the custom WebPart control. This file should be placed in the App_Code directory.

No code example is currently available or this language may not be supported.

Load the page in a browser. Type in a name to represent a URL, then add an actual URL beginning with http://, and click the Add button to add the URL.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft