State Management in ASP.NET

                 State Management in ASP.NET

· In an ASP NET application, state management in ASP NET is an object and preserves type state control.

· This is because ASP NET applications are basically stateless.

· In ASP NET, the information of users is stored and maintained till the user session ends.

· Each time the page is posted on the server, a new instance of the Web page class is created.

Types of State Management in ASP.NET

There are two types of State management in ASP net.

· Server-side 

· Client-side

                   

Server-side

An important technique to maintain state. It is used to store identity and information; information is stored in the server using Sessionid.

       

Session

Two types -

· Session starts - Raised every time a new user requests without a session ID.

· Session end - Raised everytime the user ends the session or a time out occurs.

The session is stored in the following ways in ASP.NET:

· InProcMode - Default session mode. When the server starts, the session value is stored, and when the server is restarted, it ends.

· State Server Mode - Session date is made to store on a separate server in this mode.

· SQL Server Mode - It’s a secure mode in which the session is made to store in the database.

· Custom Mode - Session data is generally stored in InProcMode, SQL Server Mode, etc. In case we want to store using any other techniques, we use the custom mode.

Application

· It is a server-side management state and is also known as the application level state management.

· This is mainly used to store user activity in server memory and application events.

Further classified into three types :

· Application start - The event begins with the start of the domain.

· Application error - This is used to manage/handle an error or exception that had been previously unhandled.

· Application end - Whenever the domain ends, this ends as well.

Cache

· This is stored on the server-side, and it is used to implement page caching and data caching. A cache is primarily used to set expiration policies.

                 Given Information is all for Server Side.

Previous Next

Start Your Data Journey Today With MSAInfotech

Take the first step towards data-led growth by partnering with MSA Infotech. Whether you seek tailored solutions or expert consultation, we are here to help you harness the power of data for your business. Contact us today and let’s embark on this transformative data adventure together. Get a free consultation today!

We utilize data to transform ourselves, our clients, and the world.

Partnership with leading data platforms and certified talents

FAQ Robot

How Can We Help?

Captcha

MSA Infotech