Difference between viewstate, cache, session

Answer Posted / chinmayee mishra

SESSION: Variables are stored on the server, can hold any
type of data including references, they are similar to
global variables in a windows application and use HTTP
cookies to store a key with which to locate user's session
variables.

VIEWSTATE: Variables are stored in the browser (not as
cookies) but in a hidden field in the browser. Also
Viewstate can hold only string data or serializable objects.


CACHE: It refers to information that is reused in your
application, or information that is stored on your computer
so it can be reused. For example, if you download an image
from the internet, it's often cached so you can view it
again without downloading the image data. Caching is a form
of replication in which information learned during a
previous transaction is used to process later transactions.

To make web surfing faster, web browsers store recently
visited pages on the user’s disk. When the site is
revisited, the browser displays pages from the cache
instead of requesting them from the server. Reloading
brings up the current page from the server.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can we inherit a static member?

503


What is server transfer?

470


Explain the difference between inline and code behind - which is best in?

480


How you can manage the state of application at the server side in ASP.NET?

550


Can more than one person use the same login?

553






What are navigation controls? How many navigation controls are there in ASP.NET 4.0?

513


How to count the number of objects present in a web page? How to count the number of radio buttons in a web page?

599


Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?

586


What is inheritance and an how it be used, example with an example?

563


Why does my asp.net file have multiple tag with runat=server?

548


Where you store Connection string in "Web.Config" file in ASP.NET?

565


In early binding will the method invoked on com component will verify it?s existance in the system or not ?

2108


Define a web service in .net?

588


Where viewstate value is stored in asp.net?

574


Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?

1695