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
Describe the diffeerence between inline and code behind?
What's the use of formatters in .net?
Explain the asp.net page life cycle.
What is actually returned from server to the browser when a browser requests an .aspx file and the file is displayed?
Distinguish between Server-side and Client-side code with its functionality?
Which is better viewstate or session?
Explain how cookies work.
What is the caspol.exe tool used for?
What is the importance of aspnet_isapi.dll, inetinfo.exe andaspnet_wp.exe in the page loading process.
Explain difference between friend and protected friend?
What are the asp.net security controls?
How can we communicate with each server in N-tier Architecture? and what are the methods?
What is meant by web application?
Where is session data stored in asp net?
How to do state management in ASP.NET?