Assembly: System.Web (in System.Web.dll)
Transformers are used to translate data between two Web Parts controls with incompatible connection points. A object transforms data from a provider implementing the IWebPartRow interface to a consumer requiring data from the IWebPartField interface. The class allows controls with these incompatible connection points to be connected.
The following code example demonstrates how to use a object to connect a provider and consumer with incompatible connection points. The first section of the example shows a Web Parts control that serves as a provider. The provider class, named RowProviderWebPart, provides data through the IWebPartRow interface.
The second section of the example contains a Web Parts control that is a consumer of a Web Parts connection. The consumer class, named FieldConsumerWebPart, expects data from the IWebPartField interface.
The third section of the example shows a page that contains the two controls and defines the object for connecting the two controls.
The code example includes a user control that enables you to change display modes on a Web Parts page. The source code for the user control comes from another topic. You can obtain the .ascx file for the user control from Walkthrough: Changing Display Modes on a Web Parts Page, and it must be placed in the same folder as the .aspx page.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.