Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,
Can anyone explain in simple words what does this property stand for?

Thanks in advance
Posted

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.

For more info see AutoEventWireup attribute in Microsoft ASP.NET Web Forms[^]
 
Share this answer
 
Comments
Albin Abel 8-Apr-11 9:52am    
Good answer. Added point autoevent wireup is just a user friendly trick. Performance wise it is not a good one. Better methods assign handlers necessary at the code behind. My 5
Wild-Programmer 10-Apr-11 22:38pm    
Thanks Albin :)
Ok, in simple words:
This was introduced in ASP.NET using which your controls and their events are automatically connected and you don't need to write code for the integration in the code behind file.

Thus, it is an automatic way to associate page events and methods.

Following link should explain you with full details:
ASP.NET Server Control Event Model[^]
http://support.microsoft.com/kb/814745[^]

Discussion and detailed articles in case you feel like more to read on:
What is the AutoEventWireup attribute in ASP.NET[^]
What is AutoEventWireup?[^]
AutoEventWireup Attribute[^]
 
Share this answer
 
v3
Comments
Albin Abel 8-Apr-11 9:52am    
Good links. Added point autoevent wireup is just a user friendly trick. Performance wise it is not a good one. Better methods assign handlers necessary at the code behind. My 5
Sandeep Mewara 8-Apr-11 10:01am    
Thanks and rightly added the perf thing.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900