Reputation: 51927
I'm using asp.net 4. Every control on a page has its viewstate turned off and in the HTML output, the viewstate looks like this:
< input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwULLTEwNDk4OTMyNTZkZGfL5BMyxxloFnGh0LG4Z2Wef3pPOstqLKsp8DrWelqn" />
When I run this string in a Base64 decoder I see that it's equal to -1049893256. This number changes on every page and every request.
The only controls I'm using are essentially literals; the page is in a master page.
What could this be field represent?
Upvotes: 0
Views: 108
Reputation: 1
You can delete the the tag of the form from the page,then view the page,the viewstate disappear in the page
second,use template engine,
Upvotes: 0
Reputation: 88044
When using webforms, you can never truly turn viewstate off. Just ignore it.
I'd highly suggest you look into the various MVC engines available for asp.net. Those might be more to your liking.
Upvotes: 3