开发者

asp.net viewstate data

开发者 https://www.devze.com 2023-03-16 13:46 出处:网络
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:

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" nam开发者_高级运维e="__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?


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.


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,

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号