response.write("<script>var aa='" + viewstate("name") + "';</script>")

解决方案 »

  1.   

    >>>我们该怎样来在客户端利用JavaScript脚本来读取、更改该对象的内容呢?theorectically possible, as long as you can read/modify forms[0].elements["__VIEWSTATE"], but why? that is the state from the previous page, why do you want to change it?
      

  2.   

    ViewState中的内容是被算法编码过的,你读取有什么用呢?why do you want to change it?
      

  3.   

    你要在客户端读取内容,为什么不转一个弯,把值再放入在一个隐藏控件中呢?
    <input type=hidden runat=server id=aaa>
    客户端用document.all.aaa.value获取。
    服务器端用this.aaa.value = ViewStat["aaa"].ToString()
    设置。