简体   繁体   中英

viewstate in asp.net

ASP.NET中ViewState中存储的(服务器控件的)属性是什么

ViewState is a dictionary-type object that stores, by default, the state of all the controls in the markup of your page. You can also programmatically add values to ViewState:

ViewState["MyStoredValue"] = 15;

You can use page-level tracing to inspect the contents of ViewState when debugging.

if you say what are the properties that are stored then they are the ones that you have stored, if you are asking what can be stored then it can be anything that you can serialize.

You can store your value using Viewstate["variableName"]=value;

and you can retrieve back using variable=Viewstate["variableName"];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM