State Management in ASP.NET

State | overview

As we all know

“Browsers are generally state less.”

Now question arises here, what actually state less mean??

State less means, whenever we do visit any website, our browser communicates with respective server according to our requested functionality or the request. Browser communicates with the respective server through HTTP or HTTPs protocol.

But after that response, what’s next or what going to happen when we do visit that website again after closing our web browser??

In this case HTTP/HTTPs doesn’t remember what website or URL we visited or in different words we can say it doesn’t hold the state of previous website that we visited before closing our browser, that is called state less.

Now I guess you will have at least idea of actually what does State and state less actually means.

So our browsers are State less.

State | Introduction

In this article I’ll try to give you a feel of state and actually why we do need states and state management concept in ASP.NET. I’ll take you through several state management techniques along with their respective general case example.

State | Outline

As I told you in starting that HTTP is a stateless protocol. It just cleans up or we can say remove all the resources/references that were serving a particular request in past. These resources can be:

  • Objects
  • A- Allocated Memory
  • S- Sessions ID’s
  • S- Some URL info

Etc.

State Management | Techniques

There are 2 techniques for state management

  • Client side
  • Server side