session state and viewstate

In an interview would you say, is the difference between a session state and viewstate?
mathieu_cuprykAsked:
Who is Participating?
 
Pra4444Connect With a Mentor Commented:
here are a few differences

1)Unlike Session state ViewState is a property of the web controls.
2)Values stored in the session are available across different pages in an application.
Where as the data contained in a control is persisted between page's post back by using that controls ViewState property.
3)View state cannot be used if the page donot post back to itself and nformation is stored in client only.
4)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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.