IParametersOutConsumer.ParametersOutReady Method

NOTE: This API is now obsolete.

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

Namespace:  Microsoft.SharePoint.WebPartPages.Communication
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")> _
Sub ParametersOutReady ( _
    sender As Object, _
    parametersOutReadyEventArgs As ParametersOutReadyEventArgs _
)
'Usage
Dim instance As IParametersOutConsumer
Dim sender As Object
Dim parametersOutReadyEventArgs As ParametersOutReadyEventArgs

instance.ParametersOutReady(sender, parametersOutReadyEventArgs)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")]
void ParametersOutReady(
    Object sender,
    ParametersOutReadyEventArgs parametersOutReadyEventArgs
)

Parameters

  • sender
    Type: System.Object

    A Web Part that implements the IParametersOutProvider interface.

  • parametersOutReadyEventArgs
    Type: Microsoft.SharePoint.WebPartPages.Communication.ParametersOutReadyEventArgs

    A ParametersOutReadyEventArgs that provides an array of string parameter values through its ParameterValues property. The number and order of parameters contained in this array must match those specified by the ParametersOutProviderInitEventArgs argument of the ParametersOutProviderInit method.

Examples

The following code example shows an implementation of a ParametersOutReady method. This code example is part of a larger example provided for the IParametersOutConsumer interface.

' Step #7: Implement the ParametersOutReady event handler.
' The connected provider part may call this method during its 
' PartCommunicationMain phase
' to pass its primary data to the consumer Web Part.
' <param name="sender">Provider Web Part</param>
' <param name="parametersOutReadyEventArgs">The args passed by the 
' Provider</param>
Public Sub ParametersOutReady(sender As Object, parametersOutReadyEventArgs As ParametersOutReadyEventArgs) _
      Implements IParametersOutConsumer.ParametersOutReady
      _parametersOutReadyFlag = True
   
   ' Set the text box values to the values of the Parameters.
   If Not (parametersOutReadyEventArgs.ParameterValues Is Nothing) Then
      _fontFamily = parametersOutReadyEventArgs.ParameterValues(0)
      _fontColor = parametersOutReadyEventArgs.ParameterValues(1)
      _fontWeight = parametersOutReadyEventArgs.ParameterValues(2)
      _fontSize = parametersOutReadyEventArgs.ParameterValues(3)
            
      ' Store font attributes in a State Bag for use by the 
      ' NoParametersOut event handler.
      ViewState("FontFamily") = _fontFamily
      ViewState("FontColor") = _fontColor
      ViewState("FontWeight") = _fontWeight
      ViewState("FontSize") = _fontSize
    End If
End Sub
// Step #7: Implement the ParametersOutReady event handler.
// The connected provider part may call this method during its 
// PartCommunicationMain phase
// to pass its primary data to the consumer Web Part.
// <param name="sender">Provider Web Part</param>
// <param name="parametersOutReadyEventArgs">The args passed by the 
// Provider</param>
public void ParametersOutReady(object sender, ParametersOutReadyEventArgs parametersOutReadyEventArgs)
{
    _parametersOutReadyFlag = true;

    // Set the text box values to the values of the Parameters.
    if(parametersOutReadyEventArgs.ParameterValues != null)
    {
        _fontFamily = parametersOutReadyEventArgs.ParameterValues[0];
        _fontColor = parametersOutReadyEventArgs.ParameterValues[1];
        _fontWeight = parametersOutReadyEventArgs.ParameterValues[2];
        _fontSize = parametersOutReadyEventArgs.ParameterValues[3];

        // Store font attributes in a State Bag for use by the 
        // NoParametersOut event handler.
        ViewState["FontFamily"] = _fontFamily;
        ViewState["FontColor"] = _fontColor;
        ViewState["FontWeight"] = _fontWeight;
        ViewState["FontSize"] = _fontSize;
    }
}

See Also

Reference

IParametersOutConsumer Interface

IParametersOutConsumer Members

Microsoft.SharePoint.WebPartPages.Communication Namespace