What is the purpose of view state,application and session and what is the difference among them?? i googled it but couldn't get exact idea .. i'm just a beginner.. help me plz

View state is to store information temporarily. The life time is limited to the life time of the particular page. It is generally used to store the page fields.

Application state is global to the application regardless of the number of application instances. All instances share the same application state variables.

Each instance has its own session variables. They are stored at the server end. One use of session is to store the user login status, its privileges, etc.

commented: Good +2

HTTP is a stateless request-response protocol. In other words, client sends a request and the server responds. The state of client and server are not maintained or altered by the exchange and no record of the request is kept.

For implementing flexible business transactions across multiple requests and responses, we need two facilities:

1. Session - The server should be able to identify that a series of request from a single client from a single working "session".
2. State - The server should be able to remember information related to previous requests and other business decisions.

ASP.NET State Management includes:
1. Server side state management
Application, Session, Cache, Profile are objects used to manage
state at server side.
2. Client side state management
Cookies, Querystring, Hidden Fields, ViewState are example of
Client side state management.

You must read MSDN online pages for "ASP.NET State Management"

@thewebhostingdi

I'm very much thank full to you for answering my each and every query :)

@adatapost

you really gave me a nice over view ...thank you very much!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.