开发者

Where the methods of Global.asax come from?

When I add Global.asax to the page, five methods (Application_Start,Session_Start,...) are added to the page automatically. But where they come from ? I loo开发者_运维百科ked at the application class and its interfaces but I couldnt find them at all.

Thanks in advance,


These methods don't come from anywhere, they exist only on your class. However, the ASP.NET runtime looks for methods in your class with these names and calls them at appropriate times in the application/page lifecycle.


Those events are bound by convention, see Life Cycle Events and the Global.asax file.


See this page under "Life Cycle Events and the Global.asax file"

http://msdn.microsoft.com/en-us/library/ms178473.aspx


Global.asax file having total 19 events and its all details you can fine much more on msdn...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜