-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: Pankil
Message 6 in Discussion

Hi Rajeev,   MSDN Archive---  Event Delegates in Web Forms Pages 
The ASP.NET page framework supports an automatic way to associate page events 
and methods. If the AutoEventWireup attribute of the <MSHelp:link tabIndex=0 
keywords="cpconPage">Page</MSHelp:link> directive is set to true (or if it is 
missing, since by default it is true), the page framework calls page events 
automatically, specifically the Page_Init and Page_Load methods. In that case, 
no explicit Handles clause or delegate is needed. 
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.

----------------------------------------------------------------------------------
 
This means when you set AutoEventWireup to true the Page specific events will 
fire twice one with the Handles Keyword (event Handler) we set for the function 
and other with .Net Page Framework which call page events automatically.  
Regards, Pankil

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to