Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Oct 28, 2005 06:31 PM|LINK
The disadvantage of the AutoEventWireup attribute is that it requires that the page event handlers have specific, predictable names. This limits your flexibility in how you name your event handlers. Therefore, in Visual Studio, the
AutoEventWireup attribute is set to false by default and the designer generates explicit code to bind page events to methods.
If you do set AutoEventWireup to true, Visual Studio will generate code to bind the events and the page framework will automatically call events based on their names. This can result in the same event code being called twice when the page
runs. As a consequence, you should always leave AutoEventWireup set to
false when working in Visual Studio.