Table of Contents

Class SessionStateTempDataProvider

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Provides session-state data to the current TempDataDictionary object.

public class SessionStateTempDataProvider : ITempDataProvider
Inheritance
SessionStateTempDataProvider
Implements
Inherited Members

Constructors

SessionStateTempDataProvider()

Initializes a new instance of the SessionStateTempDataProvider class.

public SessionStateTempDataProvider()

Methods

LoadTempData(ControllerContext)

Loads the temporary data by using the specified controller context.

public virtual IDictionary<string, object> LoadTempData(ControllerContext controllerContext)

Parameters

controllerContext ControllerContext

The controller context.

Returns

IDictionary<string, object>

The temporary data.

Exceptions

InvalidOperationException

An error occurred when the session context was being retrieved.

SaveTempData(ControllerContext, IDictionary<string, object>)

Saves the specified values in the temporary data dictionary by using the specified controller context.

public virtual void SaveTempData(ControllerContext controllerContext, IDictionary<string, object> values)

Parameters

controllerContext ControllerContext

The controller context.

values IDictionary<string, object>

The values.

Exceptions

InvalidOperationException

An error occurred the session context was being retrieved.