Edit

Share via


WebPartConnection.Transformer Property

Definition

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

public:
 property System::Web::UI::WebControls::WebParts::WebPartTransformer ^ Transformer { System::Web::UI::WebControls::WebParts::WebPartTransformer ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Web.UI.WebControls.WebParts.WebPartTransformer Transformer { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Transformer : System.Web.UI.WebControls.WebParts.WebPartTransformer
Public ReadOnly Property Transformer As WebPartTransformer

Property Value

A WebPartTransformer. The default value is null.

Attributes

Remarks

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.

Applies to

See also