WebPartsSection.Transformers Property

 

Gets a collection of TransformerInfo objects.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

<ConfigurationPropertyAttribute("transformers")>
Public ReadOnly Property Transformers As TransformerInfoCollection

TransformerInfo objects specify custom classes that extend the WebPartTransformer class for use by Web Part connections for the ASP.NET applications affected by the configuration file. These transformer classes act as bridges between connected Web Parts, translating data between Web Parts with incompatible connection points.

The following code example shows how to use the Transformers property.

' Add a Transfomer Info Object to the collection using a constructor.
webPartsSection.Transformers.Add(New TransformerInfo( _
  "RowToFilterTransformer", _
  "MyCustomTransformers.RowToFilterTransformer"))

' Show all TransformerInfo objects in the collection.
Dim ti As Integer
For ti = 0 To webPartsSection.Personalization.Providers.Count - 1
  Console.WriteLine("  #{0} Name={1} Type={2}", ti, _
    webPartsSection.Transformers(ti).Name, _
    webPartsSection.Transformers(ti).Type)
Next

' Remove a TransformerInfo object by name.
webPartsSection.Transformers.Remove("RowToFilterTransformer")

' Remove a TransformerInfo object by index.
webPartsSection.Transformers.RemoveAt(0)

' Clear all TransformerInfo objects from the collection.
webPartsSection.Transformers.Clear()

.NET Framework
Available since 2.0
Return to top
Show: