ASP.NET页面生命周期:方法vs事件 [英] ASP.NET Page life cycle: methods vs Events

查看:178
本文介绍了ASP.NET页面生命周期:方法vs事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以向我解释ASP.NET页面生命周期中方法和事件的区别吗?



谢谢

解决方案

当页面运行时,执行一系列方法。这些方法反过来又提高了用户可以处理的事件,以执行诸如初始化控件,填充控件属性,执行控制行为代码等各种任务。



这是一个来自MSDN的优秀流程图,显示了执行的不同方法,以及从这些方法引发的事件:





有关ASP.NET页面生命周期的更多信息,请参阅MSDN的完整概述:
http://msdn.microsoft.com /en-us/library/ms178472.aspx


Can someone please explain to me the difference between methods and events in the ASP.NET page life cycle?

Thanks

解决方案

When a page runs a series of methods are executed. These methods in turn raise events that can be handled by the user to perform various tasks like initializing controls, populating control properties, executing control behavioral code, etc.

Here is an excellent flowchart from MSDN that shows the different methods that are executed, and the events that are raised from those methods:

For more information about the ASP.NET Page Lifecycle, see the full overview on MSDN:
http://msdn.microsoft.com/en-us/library/ms178472.aspx

这篇关于ASP.NET页面生命周期:方法vs事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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