Suoranta.EnterpriseLib.Web - Developer API

ControllerExtensions..::..Set<(Of <(<'TValue>)>)> Method

Sets the key to the value within the HTTP session.

Namespace:  Suoranta.EnterpriseLib.Web.MVC
Assembly:  Suoranta.EnterpriseLib.Web (in Suoranta.EnterpriseLib.Web.dll)

Syntax


public static void Set<TValue>(
	this HttpSessionStateBase httpSession,
	string key,
	TValue value
)

Type Parameters

TValue
The type of the value.

Parameters

httpSession
Type: HttpSessionStateBase
key
Type: String
value
Type: TValue

Remarks


Session state requires that it is configured in web.config, e.g.
C#
<system.web><sessionState cookieless="false" cookieName="demoApp" mode="InProc" regenerateExpiredSessionId="true" /></system.web>