Briefly describe different techniques for ASP.NET State
Management?

Answer Posted / shamna sankar

State management is implemented in order to retain
information about the user requests. Web pages are
stateless. Each request creates new page without retaining
any previous information about the user requests. ASP.NET
supports several State management techniques to maintain
state information.

State management in ASP.NET can be classified into
1.Client-side state management
2.Server-side state management

Client-side state management

This maintains information on the client's machine
using Cookies, View State, and Query Strings.

Cookies.
A cookie is a small text file on the client machine either
in the client's file system or memory of client browser
session. Cookies are not good for sensitive data. Moreover,
Cookies can be disabled on the browser. Thus, you can't
rely on cookies for state management.

View State
Each page and each control on the page has View State
property. This property allows automatic retention of page
and controls state between each trip to server. This means
control value is maintained between page postbacks.
Viewstate is implemented using _VIEWSTATE, a hidden form
field which gets created automatically on each page. You
can't transmit data to other page using view state.

Querystring
Querystring can maintain limited state information. Data
can be passed from one page to another with the URL but you
can send limited size of data with the URL. Most browsers
allow a limit of 255 characters on URL length.

Server-side state management
This kind of mechanism retains state in the server.

Application State
The data stored in an application object can be shared by
all the sessions of the application. The application object
stores data in the key value pair.

Session State
Session state stores session-specific information and the
information is visible within the session only. ASP.NET
creates unique sessionId for each session of the
application. SessionIDs are maintained either by an HTTP
cookie or a modified URL, as set in the application's
configuration settings. By default, SessionID values are
stored in a cookie.

Database
Database can be used to store large state information.
Database support is used in combination with cookies or
session state.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What tags do you need to add within the asp:datagrid tags to bind columns manually? How?

512


What are validator? Name the validation controls in asp.net? How do you disable them? Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?

551


Let's say I have an existing application written using vb6 and this application utilizes windows 2000 com+ transaction services. How would you approach migrating this application to.net?

505


Explain the reason why the javascript validation not run on the asp.net button but run successfully on the html button?

572


What is sta?

556






What is csrf attack in asp.net?

519


How information about the user's locale can be accessed?

581


Where would you use an ihttpmodule, and what are the limitations of any?

548


What is the mvc framework?

564


What is viewstate information stored?

598


What is session in http request?

554


benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks

1672


What is query string in asp.net?

563


Which validator control you use if you need to make sure the values in two different controls matched?

648


Where the cookie value is stored?

509