服务器如何检查每个控件的状态以识别更改 [英] How the server checking the state of each and every control to identify changes

查看:69
本文介绍了服务器如何检查每个控件的状态以识别更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,这是我的访谈问题,如果我们单击asp.net2.0中的按钮,服务器如何在viewstate中识别按钮状态的更改,执行此服务器检查过程的任何功能或其他某些东西确定的每个控制状态都将发生变化.请尽快帮助我,星期三我有最后一轮

Hi, this is my interview question, if we click the button in asp.net2.0, how the server identifies the button''s state changed in the viewstate, Any function or some other things doing this process of Server checking the state of each and every contol to identifie changes. please help me as soon as possible, coming wednesday i have the final round

推荐答案

karthime,

希望您了解视图状态属性及其用途.

尝试从这些方面寻找解决方案.

1.values可以在页面的PreInit事件之后和页面的PreRender事件之前访问.
2.可以使用web.config文件< pages buffer ="true">
< configuration>
更改Web应用程序中所有页面的Viewstate
Hi karthime,

Hope you were aware of view state property and its uses.

Try to find solution from these points.

1.values can be accessed after the PreInit event for the page and before the PreRender event of the page.
2.Viewstate can be altered for all the pages in a web application using web.config file <pages buffer="true">
<configuration>
<system.web>
<pages buffer="true">
enableViewState="true" />
</pages></system.web>


服务器使用ViewState跟踪各种控件的状态. Viewstate保留了两次页面访问之间的值.如果我们更改任何控件的值,则将使用保存的viewstate检查回发的值,以确定该值是否已更改.
The server uses ViewState to track the state of various controls. Viewstate is what retains the values between page visits. If we change the value of any control then postedbacked value is checked with saved viewstate to determine that the value is changed or not.


这篇关于服务器如何检查每个控件的状态以识别更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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