Share 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)

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