WebPartPersonalization.CopyPersonalizationState Method

Note: This method is new in the .NET Framework version 2.0.

Extracts the personalization state from one Web Parts control and applies it to a second Web Parts control.

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

protected public:
virtual void CopyPersonalizationState (
	WebPart^ webPartA, 
	WebPart^ webPartB
)
protected void CopyPersonalizationState (
	WebPart webPartA, 
	WebPart webPartB
)
protected internal function CopyPersonalizationState (
	webPartA : WebPart, 
	webPartB : WebPart
)

Parameters

webPartA

The Web Parts control supplying the personalization data.

webPartB

The Web Parts control receiving the personalization data.

Exception typeCondition

ArgumentException

Either webPartA or webPartB is a null reference (Nothing in Visual Basic).

This method extracts the personalization state from webPartA and applies it to webPartB. This method assumes that webPartA and webPartB are the same type. If the Web Parts controls are GenericWebPart controls, the method copies the personalization state from the child control wrapped in webPartA to the child control wrapped in webPartB.

As part of the copy operation, webPartB is marked as "dirty".

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: