GeekInterview.com
Series: Subject: Topic:
Question: 54 of 169

What Is The Difference Between ViewState and SessionState

Asked by: Interview Candidate | Asked on: Apr 3rd, 2006
Showing Answers 1 - 4 of 4 Answers
krishna_v

Answered On : Apr 3rd, 2006

View all answers by krishna_v

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.

Phani Krishna Reddy V

  
Login to rate this answer.
debiprosad

Answered On : Jun 30th, 2006

View State are valid mainly during postbacks and information is stored in client only. Viewstate are valid for serializable data only. Moreover Viewstate are not secured as data is exposed to client. although  we  can configure page directive and machine key to make view state encrypted. Where in case of session this is user specific data that is stored in server memory . Session state is valid for any type of objects. We can take help of session through different web pages also.

  
Login to rate this answer.
Raghu

Answered On : Jul 14th, 2006

Unlike Session state ViewState is a property of the web controls.

Both are used to persist certain data.

Values stored in the session are available across different pages in an application.

Where as the vdata contained in a control is persisted between page's post back by using that controls ViewState property.

View state cannot be used if the page donot post back to itself.

  
Login to rate this answer.
jawadtbz

Answered On : Oct 3rd, 2007

View all answers by jawadtbz

Viewstate is maintained at page level. view state of one page is not visible to another page.
session state on the other hand is maintained at the session level, it accessible to all pages within a user session.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.