1

I'm curious to know what happens to the ViewState on the browse back button.

Does it stay or does the page make a new request?

4

1 回答 1

1

Viewstate 一旦呈现为 html 就不再是 .NET 实现,它们成为页面 html 中的普通隐藏字段。所以当你做浏览返回按钮的时候,大部分时间我们从浏览器的缓存中获取页面,是不会有请求到服务器的。没有办法只有 ViewState 会在不刷新页面的情况下自行更新,因为在一天结束时 Viewstate 只不过是一些隐藏字段。

于 2013-04-18T08:51:19.623 回答