Total Page Preview:   000000002377

What are the different state management options available in ASP.NET

 

Different type of state management in ASP.NET in English

In ASP.NET, there are several options available for managing the state of web pages and controls. These state management options can be used to store and retrieve values between postbacks and to maintain the state of a web application. Here are the different state management options available in ASP.NET:

The Microsoft ASP.NET framework includes several options to help you preserve data on both a per-page basis and an application-wide basis. These options can be broadly divided into the following two categories,  
  • Client-Side State Management Options
  • Server-Side State Management Options

1-Client-Side State Management

Client-based options involve storing information either on the page or on the client's computer.
Some client-based state management options are,  
  • Hidden fields
  • View state
  • Cookies
  • Query strings
2-Server-Side State Management
 
There are situations where you need to store the state information on the server side.
Server-side state management enables you to manage application-related and session-related information on the server.
ASP.NET provides the following options to manage the state on the server side:  
  • Application state
  • Session state

 

1-View State: View State is a client-side state management mechanism that is used to store values between postbacks. It is stored as a hidden field in the page and is encrypted for security. View State is suitable for storing small amounts of data such as control values, but it can become inefficient for storing large amounts of data.
 
2-Control State: Control State is similar to View State, but it is used to store state information for a specific control on the page. It is stored as a hidden field in the control and is encrypted for security.
 
3-Session State: Session State is a server-side state management mechanism that is used to store values between postbacks for a particular user session. It is stored on the server and can be accessed from any page in the application. Session State is suitable for storing larger amounts of data such as user preferences, user-specific data, and shopping cart items.
 
4-Application State: Application State is similar to Session State, but it is used to store values that are common to all users of the application. It is stored on the server and can be accessed from any page in the application. Application State is suitable for storing global data such as application-level configuration settings.
 
5-Cookies: Cookies are small text files that are stored on the client-side and are used to store values between postbacks. Cookies can be used to store user preferences, user-specific data, and shopping cart items.
 
6-Query String: Query String is a client-side state management mechanism that is used to pass values between pages in the application. It is stored in the URL and can be accessed by the receiving page.
 
7-Hidden Fields: Hidden Fields are client-side controls that are used to store values between postbacks. They are not visible to the user and can be accessed by the server-side code.
 
These are the different state management options available in ASP.NET, and they can be used individually or in combination with each other depending on the requirements of the application.
 
 
 
 
 
Different type of state management in ASP.NET in Hindi
 
ASP.NET mein kai prakar ke state management techniques hote hain jo web page aur controls ki sthiti ko maintain karne mein upyog kiye jate hain. Yahan ASP.NET ke kuch pramukh state management techniques hain:
 
 
1-View State: View State ek client-side state management technique hai jo postbacks ke beech mein values store aur retrieve karne ke liye upyog ki jati hai. Yeh page mein ek hidden field ke roop mein store kiya jata hai aur suraksha ke liye encrypt kiya jata hai. View State chhote amounts ki data jaise control values ke liye upyogi hai, lekin badi matra mein data ko store karne ke liye adhik as efficient nahin hai.
 
2-Control State: Control State View State jaisa hi hai, lekin yeh page ke ek vishesh control ke liye state information store karne ke liye upyog ki jati hai. Yeh control mein ek hidden field ke roop mein store kiya jata hai aur suraksha ke liye encrypt kiya jata hai.
 
3-Session State: Session State ek server-side state management technique hai jo postbacks ke beech mein ek vishesh user session ke liye values store aur retrieve karne ke liye upyog ki jati hai. Yeh server par store kiya jata hai aur application ke kisi bhi page se access kiya ja sakta hai. Session State badi matra mein data jaise user preferences, user-specific data aur shopping cart items ko store karne ke liye upyogi hai.
 
4-Application State: Application State Session State jaisa hi hai, lekin yeh application ke sabhi users ke liye common values store karne ke liye upyog ki jati hai. Yeh server par store kiya jata hai aur application ke kisi bhi page se access kiya ja sakta hai. Application State global data jaise application-level configuration settings ko store karne ke liye upyogi hai.
 
5-Cookies: Cookies ek chhoti text file hoti hai jo client-side par store ki jati hai aur postbacks ke beech mein values ko store karne ke liye upyog ki jati hai. Cookies ko user preferences, user-specific data aur shopping cart items ko store karne ke liye upyog kiya ja sakta hai.
 
6-Query String: Query String ek client-side state management technique hai jo application ke pages ke beech mein values pass karne ke liye upyog ki jati hai. Yeh URL mein store kiya jata hai aur receiving page dvara access kiya ja sakta hai.
 
7-Hidden Fields: Hidden Fields ek client-side control hota hai jo postbacks ke beech mein values ko store karne ke liye upyog kiya jata hai. Yeh user ke liye dikhayi nahin deta aur server-side code dvara access kiya ja sakta hai.
 
Yeh kuch pramukh state management techniques hain jo ASP.NET mein upyog kiye jate hain. Inhe alag-alag ya ek sath upyog kiya ja sakta hai application ke requirement ke anusar.

 

 

 

 

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments


                           
                           

                           

                           

Facebook User: