Click here to Skip to main content
16,015,991 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi
can you please tell me the main differences among viewstate , hiddenfields and cookies in state management concept in .net ??
Posted

I guess you mean to say "Hidden fields" and not "hiddenfiles".

Have a look at below links for "ASP.NET State Management Overview".

http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx

http://msdn.microsoft.com/en-us/library/z1hkazw7.aspx

http://wiki.asp.net/page.aspx/30/state-management/
 
Share this answer
 
Comments
aytharavi 5-Nov-11 6:38am    
yupp... thanq :)..
all these 3 ie. viewstate, cookies and hiddenfeilds comes under client side state management only.
Cookies.
for more refer:
http://webhacking.org.ua/117.htm[^]
A cookie is a small text file on the client machine either
in the client's file system or memory of client browser
session. Cookies are not good for sensitive data. Moreover,
Cookies can be disabled on the browser. Thus, you can't
rely on cookies for state management.

View State
Each page and each control on the page has View State
property. This property allows automatic retention of page
and controls state between each trip to server. This means
control value is maintained between page postbacks.
Viewstate is implemented using _VIEWSTATE, a hidden form
field which gets created automatically on each page. You
can't transmit data to other page using view state.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900