Export (0) Print
Expand All

WebPartManagerInternals Class

Isolates into a separate class methods that are used by the WebPartManager control and can be overridden by developers who extend the control, but are rarely needed by page developers.

System.Object
  System.Web.UI.WebControls.WebParts.WebPartManagerInternals

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

public sealed class WebPartManagerInternals

The WebPartManagerInternals type exposes the following members.

  NameDescription
Public methodAddWebPartAdds a WebPart or server control to the WebPartManager control's collection of WebPart controls on a Web page.
Public methodCallOnClosingCalls the OnClosing method of the specified control.
Public methodCallOnConnectModeChangedCalls the OnConnectModeChanged method of the specified control.
Public methodCallOnDeletingCalls the OnDeleting method of the specified control.
Public methodCallOnEditModeChangedCalls the OnEditModeChanged method of the specified control.
Public methodConnectionDeletedIndicates whether the specified WebPartConnection object has been deleted.
Public methodCreateObjectFromTypeCreates an object based on the parameter passed to the method.
Public methodDeleteConnectionSets a property to indicate that the specified connection object has been deleted.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetZoneIDGets the ID of a zone that contains the specified WebPart or server control.
Public methodLoadConfigurationStateLoads previously saved state data for a WebPartTransformer object that participates in a connection between controls.
Public methodRemoveWebPartRemoves a WebPart or other server control from the WebPartManager control's collection of controls.
Public methodSaveConfigurationStateSaves state data for a WebPartTransformer object that participates in a connection between controls.
Public methodSetConnectErrorMessageEstablishes an errors message, and causes the WebPartChrome object that is responsible for rendering a WebPart control to render that message rather than the contents of the control.
Public methodSetHasSharedDataSets a property on a WebPart or other server control indicating whether the control has shared personalization data.
Public methodSetHasUserDataSets a property on a WebPart or other server control indicating whether the control has user personalization data.
Public methodSetIsClosedSets the IsClosed property of a WebPart control.
Public methodSetIsShared(WebPart, Boolean)Sets the IsShared property of a WebPart control.
Public methodSetIsShared(WebPartConnection, Boolean)Sets the IsShared property of a WebPartConnection object.
Public methodSetIsStandaloneSets the IsStandalone property of a WebPart control.
Public methodSetIsStatic(WebPart, Boolean)Sets the IsStatic property of a WebPart control.
Public methodSetIsStatic(WebPartConnection, Boolean)Sets the IsStatic property of a WebPartConnection object.
Public methodSetTransformerAssigns a WebPartTransformer object to be used in a connection between two server controls.
Public methodSetZoneIDSets a property that enables a WebPart or server control to keep the ID of the containing zone.
Public methodSetZoneIndexSets the index of the specified controlwithin its zone relative to the other WebPart controls within the zone.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The WebPartManager class is the largest class in the Web Parts control set. It is also among the most important Web Parts classes because it is used on every Web page that contains Web Parts controls, and it coordinates and manages all Web Parts controls on a page.

Because the WebPartManager class is used so frequently, and because it contains so many exposed methods, some methods needed mostly by control developers who are extending the WebPartManager control are contained in the WebPartManagerInternals class. This isolation of less-used methods into the WebPartManagerInternals class simplifies the API of the WebPartManager class, and the isolated methods do not appear on the WebPartManager object in IntelliSense.

Developers who use the WebPartManagerInternals class are likely to have scenarios where they need to inherit from the WebPartManager control and customize it extensively. For example, if you are building a Web portal application or a packaged set of Web Parts controls with custom display modes, custom zones, custom verbs, custom WebPart controls, and other extensions of the base Web Parts user interface (UI), in many cases (not all) you will need to override and extend some of the WebPartManager members. And although the WebPartManagerInternals class is sealed so you cannot inherit from it, your custom WebPartManager class will likely need to call a number of the WebPartManagerInternals methods in order to manage Web Parts controls on a page.

NoteNote

Like the WebPartManager class, the WebPartManagerInternals class provides a server control that has no UI and is never visible on a page. Unlike WebPartManager, the WebPartManagerInternals class is never declared in the markup of a page; it is strictly a worker object that performs background tasks. The typical way of using it is demonstrated by the WebPartManager class, which references it by means of the protected Internals property, and uses the referenced object to call the WebPartManagerInternals methods.

The WebPartManagerInternals class contains only methods; there are no properties or events. All the methods in the class involve managing WebPart controls, or connections between controls.

To handle WebPart controls, WebPartManagerInternals includes methods for adding them (AddWebPart), removing them RemoveWebPart), handling events CallOnDeleting), getting or setting details about their relationship to their zone (for example, GetZoneID and SetZoneIndex), or setting basic WebPart control properties (for example, SetIsClosed and SetHasSharedData).

To handle connections, WebPartManagerInternals includes methods for deleting them (DeleteConnection), setting which transformer object to use (SetTransformer), setting whether a connection is shared and whether it is static (SetIsShared(WebPartConnection, Boolean) and SetIsStatic(WebPartConnection, Boolean)), and setting a connection error message to use (SetConnectErrorMessage).

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft