IParametersOutConsumer.NoParametersOut Method
NOTE: This API is now obsolete.
Provides an event handler for a consumer Web Part to process the NoParametersOut 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 NoParametersOut ( _
sender As Object, _
e As EventArgs _
)
'Usage
Dim instance As IParametersOutConsumer
Dim sender As Object
Dim e As EventArgs
instance.NoParametersOut(sender, e)
[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")]
void NoParametersOut(
Object sender,
EventArgs e
)
Parameters
sender
Type: System.ObjectA Web Part that implements the IParametersOutProvider interface.
e
Type: System.EventArgsA System.EventArgs object.
Remarks
If a consumer Web Part that implements the IParametersOutConsumer interface receives the NoParametersOut event, it should reuse its existing parameters.
Examples
The following code example shows an implementation of a NoParametersOut method. This code example is part of a larger example provided for the IParametersOutConsumer interface.
' Step #8: Implement the NoParametersOut 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 NoParametersOut(sender As Object, eventArgs As EventArgs) Implements IParametersOutConsumer.NoParametersOut
_noParametersOutFlag = 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
// Step #8: Implement the NoParametersOut 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 void NoParametersOut(object sender, EventArgs eventArgs)
{
_noParametersOutFlag = true;
// Set font attributes based on cached values.
_fontFamily = (string)ViewState["FontFamily"];
_fontColor = (string)ViewState["FontColor"];
_fontWeight = (string)ViewState["FontWeight"];
_fontSize = (string)ViewState["FontSize"];
}
See Also
Reference
IParametersOutConsumer Interface