Good Day
i would like to take a Chance to thank you for your involvement in Dotnetfunda. to answer your question.
Session State is useful for storing values that must be persisted across
multiple pages by the same user. ViewState is useful for storing
serializable data that must be persisisted across PostBacks by a single
page. If you use Session State, the value you insert will remain in memory
until (1) The Session times out, or (2) Your code removes it. If you use
ViewState, the value you insert will remain in ViewState until the user
requests a different page.
ViewStates are heavier than Sessions. look at this
http://forums.asp.net/p/1446151/3291440.aspx
Now the Problem with Viewstate is that it does not have the capability of expiration and means it will hog the memory until you close the page or move to another page.
Thank you for Posting at Dotnetfunda
Vuyiswa Maseko
Thank you for posting at Dotnetfunda
[Administrator]
Adnan, if this helps please login to Mark As Answer. | Alert Moderator