Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between ViewState["object"] and Page.Items["object"]

Tags:

asp.net

I would like to know what is the difference between ViewState["object"] and Page.Items["object"]?

like image 236
user627283 Avatar asked Dec 22 '22 09:12

user627283


1 Answers

Page.Items is only used for the lifetime of the Asp.net page processing cycle. ViewState, however, is posted back (because its written out to the form), so it is refreshed with each new page.

like image 115
Daniel A. White Avatar answered Jan 29 '23 20:01

Daniel A. White