什么是回发数据和视图状态数据之间的差 [英] what is the difference between postback data and view state data

查看:99
本文介绍了什么是回发数据和视图状态数据之间的差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解一个Asp.net页面生命周期中不同的事件。我碰到这个链接。它有两个阶段,加载视图状态,并加载回发数据。我曾经认为这些既意味着同样的事情。但是,这篇文章说,这回发数据不是视图状态数据。我不明白这一点。如果任何人都可以去看看。

I am trying to understand different events in a Asp.net page life cycle. I came across to this link. It has two stages Load view state and Load postback data. I used to thought that these both means the same thing. But this article says, that postback data is not viewstate data. I don't understand this. If anyone can have a look.

推荐答案

ViewState中的数据是,ASP.NET连接codeD端发送到客户端数据的 _ViewState 隐藏字段。它基本上是页面,因为它是当它被发送到客户端。

ViewState data is data that ASP.NET encoded end sent to the client in the _ViewState hidden field. It's basically the page as it was when it was sent to the client.

回发数据是在用户提交的内容

PostBack data is data that the user submits.

例如,假设你有一个有像这样定义的页面上的文本框:

For example suppose you have a have a textbox on a page defined like so:

<asp:TextBox id="TextBox1" runat="server" text="Some Text" />

您键入的我的用户输入的成文本并提交表单。 某些文本将ViewState的数据和我的用户输入将回传数据。

You type in My user input into the textbox and submit the form. Some Text would be ViewState data and My user input would be the PostBack data.

修改,然后你会在情况下,想了解更多关于ViewState的,还有这里的优秀文章:<一个href="http://weblogs.asp.net/infinitiesloop/archive/2006/08/03/Truly-Understanding-Viewstate.aspx">Truly了解视图状态。

EDIT And in case you would like to learn more about ViewState, there's an excellent article here: Truly Understanding Viewstate.

这篇关于什么是回发数据和视图状态数据之间的差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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