IParametersOutConsumer.NoParametersOut - Méthode

Remarque : cette API est désormais obsolète.

Fournit un gestionnaire d'événements pour un consommateur WebPart pour traiter l'événement NoParametersOut d'un fournisseur de composant qui implémente l'interface IParametersOutProvider .

Espace de noms :  Microsoft.SharePoint.WebPartPages.Communication
Assembly :  Microsoft.SharePoint (dans Microsoft.SharePoint.dll)

Syntaxe

'Déclaration
<ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")> _
Sub NoParametersOut ( _
    sender As Object, _
    e As EventArgs _
)
'Utilisation
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
)

Paramètres

  • sender
    Type : System.Object

    Un composant WebPart qui implémente l'interface IParametersOutProvider .

Remarques

Si un composant qui implémente l'interface IParametersOutConsumer consommateur reçoit l'événement NoParametersOut , elle doit réutiliser ses paramètres existants.

Exemples

L'exemple de code suivant illustre une implémentation d'une méthode NoParametersOut . Cet exemple de code fait partie d'un exemple plus développé fourni pour l'interface 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"];
}

Voir aussi

Référence

IParametersOutConsumer interface

IParametersOutConsumer - Membres

Microsoft.SharePoint.WebPartPages.Communication - Espace de noms