HighTechTalks DotNet Forums  

Re: Events not firing from page-behind file from Page.LoadControl

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Re: Events not firing from page-behind file from Page.LoadControl in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ben Lovell
 
Posts: n/a

Default Re: Events not firing from page-behind file from Page.LoadControl - 09-01-2004 , 03:25 PM






Are you adding this dynamically loaded control to your page's Controls
collection?

--
Ben
http://bitarray.co.uk/ben

"James Geurts" <James Geurts (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I am trying to load a control (.ascx) that also has an associated
code-behind file. I use Page.LoadControl to do so, but I'm seeing some
weird
results. Only the markup in the .ascx file is loaded and everything in
the
control's associated code-behind file is ignored. If I add a break point
to
even the OnInit function, it doesn't get hit. Is there a way to load a
control (dynamically) and have it's code-behind work as expected?

Thanks

Jim



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.