Assembly: System.Web (in system.web.dll)
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.
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).
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.