共用方式為


IParametersOutConsumer.NoParametersOut method

NOTE: This API is now obsolete.

提供消費者 Web 組件,以處理提供者實作IParametersOutProvider介面的網頁組件的NoParametersOut事件的事件處理常式。

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

Syntax

'宣告
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")> _
Sub NoParametersOut ( _
    sender As Object, _
    e As EventArgs _
)
'用途
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
)

參數

  • sender
    Type: System.Object

    網頁組件實作 IParametersOutProvider 介面。

備註

如果消費者 Web 組件實作IParametersOutConsumer介面收到的NoParametersOut事件,則應該重複使用現有的參數。

Examples

下列程式碼範例會顯示NoParametersOut方法的實作。這個程式碼範例是提供IParametersOutConsumer介面的完整範例的一部分。

' 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"];
}

請參閱

參照

IParametersOutConsumer interface

IParametersOutConsumer members

Microsoft.SharePoint.WebPartPages.Communication namespace