AutoEventWireup.................Help

T

thomson

Hi All,
i have written a Web application program, in the page load
i have given Response.write=("true")

if in the page attribute, the default is
AutoEventWireup="false", when i run the program, it shows true as
output, executes once
But if i keep AutoEventWireup="true", it gives me the result
truetrue, that means it is executing twice,
Can any one explain me why is it so
Thanks in Advance

thomson
 
J

Joyjit Mukherjee

Hi,

Your Page_Load event handler is attached twice to the Page Event delegate
when you set autoeventwireup = "true", the first automatically by the ASP
..NET runtime and then in the Initializecomponent() method. So if you really
want the runtime to attach the events to their handlers automatically, set
it to true, otherwise it affects performance so keep it false.

HTH

regards
Joyjit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top