Home » Microsoft » 98-361 » Which type of state management should you use?
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
Correct Answer: C
Explanation/Reference:
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 often-used data that does not change from one user to another.
Incorrect: not A: 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.