Please give me the real life examples of use of Cookie, Cache,view state and session object

Posted by Karam under ASP.NET on 7/11/2011 | Points: 10 | Views : 9325 | Status : [Member] | Replies : 7
Please give me the real life examples of the use of Cookie, Cache,view state and session object to understand the use of these concepts more deeply?

Karam


Responses

Posted by: SheoNarayan on: 7/11/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Cookie - is used to store some user specific data (small amount) on client's computer. such as Login token, user preferences etc.
Cache - is used to store application specific data in the server memory. We can store huge amount of data provided server has enough capacity to hold. such as data retrieved from complex logic can be stored into cache so that every time that logic doesn't has to run as the same can be retrieved from the cache and served to the user. The data stored into Cache is not user specific, it is application specific.
ViewState - is used to store state information for the asp.net server controls or can also be used to store small amount of data related with that page and user. It stores the data the web page in the form of hidden field in encrypted format. This data is only accessible when the page is posted back on the server (it can't be accessed by redirecting on the same page)
Session - is used to store user specific data on the server. Such as data retrieved from database specific to that user so that it can be used through out the application for that specific user.

Hope this helps

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Karam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Susanthampy on: 7/11/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi,

Refer this link,

http://forums.asp.net/t/983980.aspx/1?Usage+scenarios+for+view+state+session+state+application+state+cookies

Regards,
Susan

Karam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karam on: 7/11/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Susanthampy ,

Thanks for your valuable reply,But in this link example of cache is not given.

Thanks,
Karam

Karam

Karam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karam on: 7/12/2011 [Member] Starter | Points: 25

Up
0
Down
Thanks SheoNarayan,

Karam

Karam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vforvijay on: 7/12/2011 [Member] Starter | Points: 25

Up
0
Down
hi...Try this link..
http://vbdotnetaddict.blogspot.com/2011/02/application-sessioncache-and-cookies-in.html

Karam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karam on: 7/12/2011 [Member] Starter | Points: 25

Up
0
Down
Thanks,

Karam

Karam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakn2 on: 7/12/2011 [Member] Starter | Points: 25

Up
0
Down
Refer this

http://stackoverflow.com/questions/553185/cache-vs-session-vs-cookies

Thanks&Regards
LakshmiNarayana Nalluri.

Karam, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response