Partilhar via


SPScenarioContext.RetrieveDataFromSessionState Method

Retrieves data from the session state for this scenario context by using the key.

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

Syntax

'Declaration
Public Function RetrieveDataFromSessionState ( _
    key As String _
) As Object
'Usage
Dim instance As SPScenarioContext
Dim key As String
Dim returnValue As Object

returnValue = instance.RetrieveDataFromSessionState(key)
public Object RetrieveDataFromSessionState(
    string key
)

Parameters

  • key
    Type: System.String

    The string to use as the key for the session state's persisted data.

Return Value

Type: System.Object
Returns an object associated with the given key.

Exceptions

Exception Condition
[KeyNotFoundException]

Thrown if the key is not found.

See Also

Reference

SPScenarioContext Class

SPScenarioContext Members

Microsoft.SharePoint.Administration Namespace