Tag Archives: Web Dev

How To Create Session-less Controller in MVC3

By | April 29, 2011

How to manage the controller’s session state? Simply we can decorate the controller class with “SessionState” attribute. [SessionState()] attribute accepts SessionStateBehaviour enumeration. SessionStateBehaviour enumeration has the following constants. SessionStateBehavior.Default – ASP.NET default logic is used to determine the session state behavior for the request. SessionStateBehavior.Required – Full read-write session state behavior is enabled for the request. SessionStateBehavior.ReadOnly –… Read More »

When we can use HttpContext.Current.Items to stores data in ASP.NET ?

By | April 25, 2011

To answer this question In a single statement, you can use HttpContext.Current.Items for very short term storage. By Short term storage means, this data is valid for a single HTTP Request.  There are many confusion around regarding storing data in HttpContext.Current. Items and storing data in Session variable. In this post I am going to describe what are… Read More »