如何在VS调试器中浏览我的页面ViewState的内容?
我有一个经常使用的 ASP.net 网页。问题是 ViewState 变得巨大!该页面有一个具有分页和排序功能的 ASP.net GridView。然而,ViewState 的大小似乎与页面上的内容完全不成比例。
我想知道如何在Visual Studio 2010调试器中浏览ViewState的内容,以便我可以知道ViewState中保存了哪些数据。
I have an ASP.net web page that is heavily used. The problem is that the ViewState is becoming huge! The page has an ASP.net GridView with paging and sorting. However, the size of the ViewState seems totally out of proportion with what's on the page.
I would like to know how to browse the contents of the ViewState in the Visual Studio 2010 debugger so that I can know what data is being saved in the ViewState.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定它是否适合您的需求,但您可以查看此工具:
http://www.pluralsight-training.net/community/media/p/51688.aspx
这是您查看的帮助程序类,它将 ViewState 的内容转储到日志中 文件。显然,您可以根据需要对其进行修改。
您可以这样调用它:
有关更多详细信息,请参阅此链接:
http://www. xoc.net/works/tips/viewstate.asp
I'm not sure if it will suit your needs, but you can check out this tool:
http://www.pluralsight-training.net/community/media/p/51688.aspx
And here's helper class you check out which dumps the contents of the ViewState to a log file. Obviously, you can modify it as needed.
And you can call it like this:
See this link for more details:
http://www.xoc.net/works/tips/viewstate.asp