什么是__VIEWSTATE持有? [英] What does the __VIEWSTATE hold?

查看:164
本文介绍了什么是__VIEWSTATE持有?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很抱歉,也许让这样一个基本的问题,但在ASP.NET网站什么是__VIEWSTATE输入字段重新present?

I'm sorry for maybe making such a basic question but in ASP.NET websites what does the __VIEWSTATE input field represent?

此外,有没有什么办法可以计算它的价值(根据其他表单字段的值)?

Also, is there any way to compute it's value (based on the values of other form fields)?

据我了解,__VIEWSTATE,顾名思义,维护表单字段值的值网页,这只是我想知道是怎么这个状态(串)产生的。如果我base64_de code __VIEWSTATE任何字符串,我看到的是一堆神秘的HTML。

I understand that __VIEWSTATE, as the name suggests, maintains the values of form field values in webpages however what I'm interested in knowing is how this state (the string) is generated. If I base64_decode any __VIEWSTATE string all I see is a bunch of cryptic HTML.

有没有什么办法更好地理解究竟是什么正在连接codeD?我搜索过去的问题,我已经找到了一些工具,可以做到这一点<一个href=\"http://www.pluralsight.com/community/blogs/fritz/archive/2007/07/17/updated-viewstate-de$c$cr.aspx\">like这一个,但不幸的是它似乎不工作。

Is there any way to better understand what exactly is being encoded? I've searched on past questions and I've found some tools that can do this like this one, but unfortunately it doesn't seem to work.

我问这个的原因是因为我已经获得了Web服务的API,给了我最需要我一起工作的价值。不过,我还需要一个额外的字段是只在表格的最后阶段使用。我已经联系了Web服务提供者但不幸的是,他们不打算这么快就更新自己的API。我希望我可以使用Web服务数据pre灌注的形式初始值,然后计算出__VIEWSTATE访问的最后一栏,显示了在表格的最后阶段,这将使整个过程快了很多。

The reason I'm asking this is because I've access to a web service API that gives me most of the values I need to work with. However I also need an additional field that is only available on the last stage of the form. I already contacted the web service provider but unfortunately and they're not going to update their API so soon. I was hoping I could prefill the form initial values using the web service data and then calculate the __VIEWSTATE to access the last field that shows up on the last stage of the form, it would make the whole process a lot faster.

不知道如果我自己做了足够清晰的,但...

Not sure if I made myself clear enough though...

推荐答案

保罗·威尔逊有一个很好的文章: ViewState的:所有你想知道

Paul Wilson has a very good article: ViewState: All You Wanted to Know

VIEWSTATE可以与 LosFormatter 类反序列化。

VIEWSTATE can be deserialized with the LosFormatter class.

这篇关于什么是__VIEWSTATE持有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆