Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 06, 2008 06:51 AM by dotnetwithrp
Oct 28, 2005 06:04 PM|LINK
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.
Oct 28, 2005 06:32 PM|LINK
Oct 29, 2005 12:18 PM|LINK
To explain it a lil more
If you know VB then remeber what happens if you double click on a button in "desing time" in the code an event procedure
Button_click( ) would come up for you to enter the code.
This is a classic feature of Auto event wireup - and in VB you had to live with it.
But in .NET you can name the event handling function whatever you want and tie up the event with the corresponding handling function.
So if you have a button you could call the MyNewButton_click( ) function. But for this to be possible the "Auto Event Wire-up" property must be set to false at the page level.
Hope this helps [:)]
Jan 12, 2008 04:32 PM|LINK
Jan 13, 2008 10:34 AM|LINK
You are replying to a post that is over 2 years old? Why? For what purpose?
Jan 13, 2008 10:50 AM|LINK
They really do come back from the dead (to the top of the list.)
That sucks big time, Um hello INNO read this please
ALL of it >>>>
Jan 13, 2008 06:10 PM|LINK
Jan 14, 2008 12:00 PM|LINK
In that case you should start a new post.
Jan 14, 2008 01:05 PM|LINK
...and how would that help someone finding this page via a google search and finding mis-information contained within?