WebPartPersonalization.CopyPersonalizationState(WebPart, WebPart) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Extracts the personalization state from one Web Parts control and applies it to a second Web Parts control.
protected public:
virtual void CopyPersonalizationState(System::Web::UI::WebControls::WebParts::WebPart ^ webPartA, System::Web::UI::WebControls::WebParts::WebPart ^ webPartB);
protected internal virtual void CopyPersonalizationState (System.Web.UI.WebControls.WebParts.WebPart webPartA, System.Web.UI.WebControls.WebParts.WebPart webPartB);
abstract member CopyPersonalizationState : System.Web.UI.WebControls.WebParts.WebPart * System.Web.UI.WebControls.WebParts.WebPart -> unit
override this.CopyPersonalizationState : System.Web.UI.WebControls.WebParts.WebPart * System.Web.UI.WebControls.WebParts.WebPart -> unit
Protected Friend Overridable Sub CopyPersonalizationState (webPartA As WebPart, webPartB As WebPart)
Parameters
- webPartA
- WebPart
The Web Parts control supplying the personalization data.
- webPartB
- WebPart
The Web Parts control receiving the personalization data.
Exceptions
Either webPartA
or webPartB
is null
.
webPartA
and webPartB
are not of the same Type.
-or-
webPartA
and webPartB
are GenericWebPart controls but one or both lack a child control.
-or-
webPartA
and webPartB
are GenericWebPart controls, but their child controls are not of the same Type.
Remarks
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".
Applies to
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應