ASP.NET Page life cycle: methods vs Events

℡╲_俬逩灬. 提交于 2019-12-09 23:39:18

问题


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

Thanks


回答1:


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



来源:https://stackoverflow.com/questions/7664969/asp-net-page-life-cycle-methods-vs-events

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!