session state and viewstate

Posted on 2007-07-30
Last Modified: 2012-05-05
In an interview would you say, is the difference between a session state and viewstate?
Question by:mathieu_cupryk
    1 Comment
    LVL 12

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now