ViewState是做状态保持的一般我们应该设置为true很多时候要用到也可以ViewState["x"]存储叶面变量

解决方案 »

  1.   

    if The Page.EnableViewState = false then the other ViewState lost the value of them.
      

  2.   

    viewstate是用来存贮当前页中的变量
    如果该页保持其视图状态,则EnableViewStat为 true;否则为 false。默认为 true
      

  3.   

    问题:
    private string a=null;button1_click:
       this.a="hello"button2:
       this.a="world"
    当单击button1,再单击button2,为什么a的值为null谢谢
      

  4.   

    http://www.aspsky.net/article/list.asp?id=2604
      

  5.   

    viewstate是可以保持控件的状态。
    最好打开viewstate.
    可以把不用视头的控件的enableviewstate=false