WebPartConnection.Transformer Property

 

Gets a WebPartTransformer object that is used to transform data between two otherwise incompatible connection points in a Web Parts connection.

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

[BrowsableAttribute(false)]
public WebPartTransformer Transformer { get; }

Property Value

Type: System.Web.UI.WebControls.WebParts.WebPartTransformer

A WebPartTransformer. The default value is null.

In a Web Parts connection, there are two ways in which the provider and consumer controls in the connection can connect. They can connect directly, through their respective ConnectionPoint objects and an interface type that is understood by both controls. Or, if they are incompatible, they can connect indirectly, using a WebPartTransformer object that transforms an interface instance from a provider into a type understood by a consumer.

When a transformer is needed as part of a connection, the Transformer property provides a reference to the WebPartTransformer object. You can add a transformer for a connection declaratively in the markup of a Web page, by adding a tag for a custom transformer (or one of the transformers provided with the Web Parts control set) within the <asp:WebPartConnection> element. You can also add a transformer programmatically, creating an instance of it in your code, and calling the ConnectWebParts(WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint, WebPartTransformer) method on the WebPartManager control to create the connection, passing to it the transformer object along with the other required parameters.

.NET Framework
Available since 2.0
Return to top
Show: