Difference between viewstate, cache, session

Answers were Sorted based on User's Feedback



Difference between viewstate, cache, session..

Answer / 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

Difference between viewstate, cache, session..

Answer / govindarao konduri

view state:- This is common way to store the data in view state.View state is using 'hidden files' to store data.Advantage is performance.Disadvantage is if any cross post back occurs the view state will expires.

Caching:- The caching always store the resulted data.First time user send a request to server, the user required data will be stored in caching from the server.Next time onwards no need to go for server,we can get the information from the caching..

Session:- Session is very secure because it was located at server.Sessions are (2) types.
1.inproc
2.Out-process(its preferred)
*State server
*Sql server

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

Can we use http handlers to upload a file in asp.net?

2 Answers  


If i have 1000 records in dataset, how to do paging?

2 Answers   Mind Tree,


For which does this Codebehind="MyCode.aspx.cs" is relevent to ?

0 Answers   Siebel,


Tell something about state management in asp.net?

3 Answers   Accenture,


Any body Having SHAREPOINT Material plzzz? please material to send prasad.k12@gmail.com

0 Answers  


Explain what are the advantages of asp.net mvc framework? : asp.net mvc

0 Answers  


WHAT IS BOXING? HOW WE CAN USE IT?

4 Answers   Seion Infotech,


Can any body provide me the sample web application in asp.net

0 Answers  


What is odata in web api?

0 Answers  


Using Statement usage in C#

2 Answers  


How to unit test Web API?

0 Answers  


How does a content page different from a master page?

0 Answers   MindCracker,


Categories