UserControl's Page_Load firing automatically

G

Glenn Spies

Hi

I created a default webform and a default webusercontrol with vs2003.
I then added the usercontrol to the form and browsed the page.
As expected, the Page_Load event fired due to the automatically created code
in InitializeComponent in the ascx.cs

I then modified the webform to refer to the usercontrol using NameSpace= and
Assembly= @ Register directives while removing src=

The interesting thing is the page_load in the usercontrol now fires *twice*.
To get it to fire once only I had to remove the event wiring in the
usercontrol.

Can somebody please explain to me what is happening? I don't want to remove
what appears to be correct event wiring =)

Regards,
Glenn
 

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,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top