Uređivanje

Dijeli putem


WebPartManagerInternals.SetIsStatic Method

Definition

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

Overloads

SetIsStatic(WebPart, Boolean)

Sets the IsStatic property of a WebPart control.

SetIsStatic(WebPartConnection, Boolean)

Sets the IsStatic property of a WebPartConnection object.

Remarks

The SetIsStatic method calls a method in a base class to set a property that indicates whether a particular instance of a control is static. In the Web Parts control set, a static control is a control that is declared in the markup of a Web page. This is in contrast to a dynamic control, which is either added to a page programmatically, or added by a user from a catalog of controls. A static control is inherently a shared control, meaning that it is visible to all users of a page, and although users can close a static control, they can never delete (permanently remove) it.

Note

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

SetIsStatic(WebPart, Boolean)

Sets the IsStatic property of a WebPart control.

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

Parameters

webPart
WebPart

The control for which the property value is being set.

isStatic
Boolean

A Boolean value that indicates whether webPart is static.

Remarks

The SetIsStatic(WebPart, Boolean) method is used to set the IsStatic property value of the control referenced by the webPart parameter. If webPart is declared within a zone in the markup of a Web page, this method sets the property value to true. If webPart is added to a page programmatically, or by a user through the Web Parts user interface (UI), then this method sets the property value to false.

Applies to

SetIsStatic(WebPartConnection, Boolean)

Sets the IsStatic property of a WebPartConnection object.

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

Parameters

connection
WebPartConnection

The connection for which the property value is being set.

isStatic
Boolean

A Boolean value that indicates whether connection is static.

Remarks

The SetIsStatic(WebPartConnection, Boolean) method is used to set the IsStatic property value of the connection referenced by the connection parameter. If connection is declared in the markup of a Web page, this method sets the property value to true. If connection is added to a page programmatically, or by a user through the Web Parts user interface (UI), then this method sets the property value to false.

Applies to