Share via


IParametersOutConsumer Interface

The IParametersOutConsumer interface allows a provider Web Part that implements the IParametersOutProvider interface to communicate its parameter list to a consumer Web Part implementing this interface. These interfaces also allow passing through other information such as a selected row.

Public Methods

The following table shows the methods of the IParametersOutConsumer interface and a brief description of each.

Name Description
NoParametersOut The method for providing an event handler for a consumer Web Part to process the NoParametersOut event of a provider Web Part that implements the IParametersOutProvider interface.
ParametersOutProviderInit The method for providing an event handler for a consumer Web Part to process the ParametersOutProviderInit event of a provider Web Part that implements the IParametersOutProvider interface.
ParametersOutReady

The method for providing an event handler for a consumer Web Part to process the ParametersOutReady event of a provider Web Part that implements the IParametersOutProvider interface.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

The IParametersOutConsumer interface should be implemented for Web Parts that need to consume a general collection of parameters. It can be used in scenarios where the consumer part was designed with an understanding of the data being sent by the provider. Also, a Web Part that implements the IParametersOutConsumer interface has the ability to receive initialization arguments from the provider part. The IParametersOutConsumer interface can only connect with the IParametersOutProvider interface. This is a direct connection, so no transformer dialog is displayed when connecting these interfaces. Therefore, the consumer part needs to correctly map the inbound parameters from the provider part.

The IParametersOutConsumer and IParametersOutProvider interfaces also allow passing additional information such as a selected row. For example, when a user clicks on a row in a list, the row data along with the parameters can be passed through these interfaces.

Example

The following code example shows a simple server-side IParametersOutConsumer Web Part. It can be connected to another Web Part which implements the IParametersOutProvider interface on the server. This Web Part displays a paragraph of text. The text style attributes such as font family, color, weight, and size can be set by a Web Part which implements the IParametersOutProvider interface.

There are 8 steps specific to making this a connectable Web Part. These steps are numbered and commented in the following sample code.

For an overview of the steps in creating a connectable Web Part, see Creating a Connectable Web Part.

Requirements

Namespace: Microsoft.SharePoint.WebPartPages.Communication

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security