As mentioned in the article, if you enabled AutoEventWireUp, asp.net automatically recognizes that you have a method with the syntax page_load and is called automatically:
private void Page_Load(object sender, System.EventArgs e) { }
This gives you cleaner code at the cost of some (very) small overhead. Please note: if you do not specify it, you must explicitly specify asp.net with which you want to handle the page load event:
this.Load += new System.EventHandler(this.Page_Load);
Please note that this applies to other events on the page as it uses the naming convention as Page_Event.
eglasius Mar 25 '09 at 9:51 2009-03-25 09:51
source share