When writing aspx, you may not be careful to remove AutoEventWireup = "false", and you may die very ugly,
The Page_load part will be executed twice when a page is loaded! Do not remove
AutoEventWireup = "false.
<% @ Page language = "c #" Codebehind = "ShowSimpleFactory. aspx. cs" AutoEventWireup = "false" Inherits = "test. DesignPatternTest. ShowSimpleFactory" %>
When you set this attribute to true, Asp. net associates page lifecycle events with some special methods, such as directly associating your Page_Load method to the OnPageLoad event in the page lifecycle. If you set this attribute to false, the automatic association will not exist. You need to set the OnPageLoad event handler.
After you set this attribute to false, you can get a little performance improvement.
Microsoft recommends that you always set AutoEventWireup to FALSE.