DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login

Regarding View state

By: rekha singh | 12 Jun 2010 2:24 pm

Hi,

I want to know the difference between view state and Session state.

 
Thanks in advance
 
Thanks & Regards
 

Comments

 View state is used to store value for single page where as Session state is for multiple pages. 

By: rekha singh | 12 Jun 2010

View State is page specific, stored as a Hidden field in client side HTML. View State stores the page controls values/state in Client Side, so that will be passed back and forth in Round Trips and post backs.

 
 
Session is maintained in the server, when a user makes a first request for a page, a session is created for him. It will be maintained until session time out period comes or he closes the browser session.  Session can be shared across different pages in the application.
 
 
By: rekha singh | 16 Jun 2010

 Hello

 
ViewState persist the values of controls of particular page in the client (browser) when post back operation done. When user requests another page previous page data no longer available.
SessionState persist the data of particular user in the server. This data available till user close the browser or session time completes.
 
By: rekha singh | 16 Jun 2010

 Tell me one thing...if user request another page then previous page  data will lost or not in session state??

By: rekha singh | 16 Jun 2010

 previous page  data will not lost in session state

By: rekha singh | 16 Jun 2010

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move