Shay Friedman
Shay Friedman

Reputation: 4868

ViewState content when there are no controls on the page

When you create an ASP.NET page with no controls and runs it, a view state hidden field is added.

Looking at what's in it (with ViewStateDecorder) reveals that there's a single value there that contains a number.

My question is - what is this number?

P.S. I guess this value appears on every page, with or without controls.

Upvotes: 1

Views: 116

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038720

The ASP.NET page stores a hash code in the "__VIEWSTATE" hidden field that is used to ensure that the view state hasn't been tampered with between postbacks.

Upvotes: 2

Related Questions