Condividi tramite


IParametersInConsumer.NoParametersIn Method

NOTE: This API is now obsolete.

Provides an event handler for the NoParametersIn event of a provider Web Part that implements the IParametersInProvider 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 NoParametersIn ( _
    sender As Object, _
    e As EventArgs _
)
'Usage
Dim instance As IParametersInConsumer
Dim sender As Object
Dim e As EventArgs

instance.NoParametersIn(sender, e)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")]
void NoParametersIn(
    Object sender,
    EventArgs e
)

Parameters

  • sender
    Type: System.Object

    A Web Part that implements the IParametersInProvider interface.

Remarks

If a consumer Web Part that implements the IParametersInConsumer interface receives the NoParametersIn event, it should reuse its existing parameters.

Examples

The following code example shows the implementation of a NoParametersIn event handler. This code example is part of a larger example provided for the IParametersInConsumer interface.

' Step #9: Implement the NoParametersIn event handler.
' The connected provider part may call this method during its 
' PartCommunicationMain phase
' to indicate there is no change in the parameter values. This allows 
' the consumer part to display its cached data instead of potentially 
' hitting a database again or recalculating values. 
' <param name="sender">Provider Web Part</param>
' <param name="eventArgs">The Event Argumentsr</param>
Public Sub NoParametersIn(sender As Object, eventArgs As EventArgs) _
    Implements IParametersInConsumer.NoParametersIn
    _noParametersInFlag = True
         
    'Set font attributes based on cached values
    _fontFamily = CStr(ViewState("FontFamily"))
    _fontColor = CStr(ViewState("FontColor"))
    _fontWeight = CStr(ViewState("FontWeight"))
    _fontSize = CStr(ViewState("FontSize"))
End Sub

See Also

Reference

IParametersInConsumer Interface

IParametersInConsumer Members

Microsoft.SharePoint.WebPartPages.Communication Namespace