WebPartManagerInternals.SetIsShared Method

Definition

Sets the IsShared property of a WebPart control or the IsShared property of a WebPartConnection object.

Overloads

SetIsShared(WebPart, Boolean)

Sets the IsShared property of a WebPart control.

SetIsShared(WebPartConnection, Boolean)

Sets the IsShared property of a WebPartConnection object.

Remarks

The SetIsShared method calls a method in a base class to set a property that indicates whether a particular instance of a control is shared. In the Web Parts control set, a shared control means a control that is visible to all users of a page. This is in contrast to a per-user control, which is visible only to the specific user who added the control to the page.

Note

For more on personalization and shared versus per-user controls, see Web Parts Personalization Overview.

SetIsShared(WebPart, Boolean)

Sets the IsShared property of a WebPart control.

public:
 void SetIsShared(System::Web::UI::WebControls::WebParts::WebPart ^ webPart, bool isShared);
public void SetIsShared (System.Web.UI.WebControls.WebParts.WebPart webPart, bool isShared);
member this.SetIsShared : System.Web.UI.WebControls.WebParts.WebPart * bool -> unit
Public Sub SetIsShared (webPart As WebPart, isShared As Boolean)

Parameters

webPart
WebPart

A WebPart for which this method sets the IsShared property.

isShared
Boolean

A Boolean value that indicates whether webPart is shared.

Remarks

The SetIsShared method does not actually cause the control referenced by the webPart parameter to be shared; it only sets the property that indicates whether webPart is currently shared.

Applies to

SetIsShared(WebPartConnection, Boolean)

Sets the IsShared property of a WebPartConnection object.

public:
 void SetIsShared(System::Web::UI::WebControls::WebParts::WebPartConnection ^ connection, bool isShared);
public void SetIsShared (System.Web.UI.WebControls.WebParts.WebPartConnection connection, bool isShared);
member this.SetIsShared : System.Web.UI.WebControls.WebParts.WebPartConnection * bool -> unit
Public Sub SetIsShared (connection As WebPartConnection, isShared As Boolean)

Parameters

connection
WebPartConnection

A WebPartConnection between two WebPart controls.

isShared
Boolean

A Boolean value that indicates whether connection is shared.

Remarks

The SetIsShared method does not actually cause the control referenced by the connection parameter to be shared; it only sets the property that indicates whether connection is currently shared.

Applies to