Partilhar via


SPScenarioContext.PersistDataToSessionState Method

Persists the name/value pair to the session state for this scenario context.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Sub PersistDataToSessionState ( _
    key As String, _
    value As Object _
)
'Usage
Dim instance As SPScenarioContext
Dim key As String
Dim value As Object

instance.PersistDataToSessionState(key, _
    value)
public void PersistDataToSessionState(
    string key,
    Object value
)

Parameters

Exceptions

Exception Condition
[ArgumentNullException]

Thrown when key is empty or a null reference (Nothing in Visual Basic).

See Also

Reference

SPScenarioContext Class

SPScenarioContext Members

Microsoft.SharePoint.Administration Namespace