You have a Microsoft ASP.NET web application. You need to store a value that can be shared across users on the server. Which type of state management should you use?
A. Session
B. ViewState
C. Application
D. Cookies
5 Comments on “Which type of state management should you use?”
Mosays:
Session or application?
0
0
Rsays:
session
0
0
Ivicasays:
Application state is a data repository available to all classes in an ASP.NET application. Application state is stored in memory on the server and is faster than storing and retrieving information in a database. Unlike session state, which is specific to a single user session, application state applies to all users and sessions. Therefore, application state is a useful place to store small amounts of oftenused data that does not change from one user to another.
Not Session State contains information that is pertaining to a specific session (by a particular client/browser/machine) with the server. It’s a way to track what the user is doing on the site.. across multiple pages…amid the statelessness of the Web. e.g. the contents of a particular user’s shopping cart is session data. Cookies can be used for session state.
Not B: Viewstate is a state management technique in asp.net. ASP.NET Viewstate is preserving the data between the requests or postbacks and stored in hidden fields on the page.
0
0
tousays:
I Agrree with you .
0
0
DB7says:
Application is correct. it must be preserved and available to all users (across all sessions), not just a single user (Session State).
Session or application?
0
0
session
0
0
Application state is a data repository available to all classes in an ASP.NET application. Application state is stored in memory on the server and is faster than storing and retrieving information in a database. Unlike session state, which is specific to a single user session, application state applies to all users and sessions. Therefore, application state is a useful place to store small amounts of oftenused data that does not change from one user to another.
Not Session State contains information that is pertaining to a specific session (by a particular client/browser/machine) with the server. It’s a way to track what the user is doing on the site.. across multiple pages…amid the statelessness of the Web. e.g. the contents of a particular user’s shopping cart is session data. Cookies can be used for session state.
Not B: Viewstate is a state management technique in asp.net. ASP.NET Viewstate is preserving the data between the requests or postbacks and stored in hidden fields on the page.
0
0
I Agrree with you .
0
0
Application is correct. it must be preserved and available to all users (across all sessions), not just a single user (Session State).
1
0