Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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?
Viewstate 一旦呈现为 html 就不再是 .NET 实现,它们成为页面 html 中的普通隐藏字段。所以当你做浏览返回按钮的时候,大部分时间我们从浏览器的缓存中获取页面,是不会有请求到服务器的。没有办法只有 ViewState 会在不刷新页面的情况下自行更新,因为在一天结束时 Viewstate 只不过是一些隐藏字段。