Sunday, February 20, 2011

SessionState attribute is new feature in MVC 3.0

one of new feature [SessionState] attribute is in MVC 3.0. that can be use for controller Sassion state  on ,off or make it read only by using SessionStateBehavior Enum with following choice.

Default - The default ASP.NET logic is used to determine the session state behavior for the request. The default logic looks for the existence of marker session state interfaces on the IHttpHandler.
Required - Full read-write session state behavior is enabled for the request. This setting overrides whatever session behavior would have been determined by inspecting the handler for the request.
ReadOnly - Read-only session state is enabled for the request. This means that session state cannot be updated. This setting overrides whatever session state behavior would have been determined by inspecting the handler for the request.
Disabled - Session state is not enabled for processing the request. This setting overrides whatever session behavior would have been determined by inspecting the handler for the request.

Read more

Thank for Reading,

Kirti M.Darji