Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > UserControl's Page_Load firing automatically

Reply
Thread Tools

UserControl's Page_Load firing automatically

 
 
Glenn Spies
Guest
Posts: n/a
 
      11-02-2005
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Materpage page_load event fired after content page_load? rockdale ASP .Net 1 11-16-2006 06:59 PM
UserControl's Page_Load firing automatically Glenn Spies ASP .Net Building Controls 0 11-03-2005 10:59 AM
in VB.NET Page_load of a base class called after the derived class Page_load ? z. f. ASP .Net 0 10-19-2004 12:01 PM
Why does page_load fire twice when inheriting from a common overridable Page_Load bminder ASP .Net 1 02-23-2004 08:54 PM
Page_Load not firing Brad ASP .Net 5 08-27-2003 09:15 AM



Advertisments