473,323 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Composite control's oninit won't fire

Ok, so I have gone off and documented the lifecycle of a page with a
custom composite control on it. You can find that document here:

http://www.ats-engineers.com/lifecycle.htm

Now, I am working on a much more complex grid example, and according to
my findings, the order should be like so:

Page Constructor
Page OnInit
Page OnLoad Enter
Page Instantiates Composite Control
Control Constructor Enter
Control Adds Button
Control Constructor Exit
Control OnInit
Page OnLoad Exit
Control OnLoad
Page PreRender
Page SaveViewState
Control SaveViewState
Control OnUnLoad
Page OnUnLoad

The document I linked to above shows the code that I used to produce
this output, and I have stepped through it multiple times to verify
that this order is true.

Now my problem is that in my MUCH more complex Custom Control, I watch
the code go from the controls constructor, to the pages OnPreRender
method, skipping the controls oninit and onload methods (which will
skip the LoadViewState method if it is a postback). There has gotta be
something simple wrong with my other composite control. However that
control is about 700 lines of code, and I don't expect anyone to go
through it, especially considering that it uses about 10 other custom
classes that I wrote.

So without me getting into too much detai, the question is what could
cause a controls oninit to not fire. This composite control inherits
from PlaceHolder, just like the example I site in my page I referred to
above, so that shouldn't be the problem. The control is being added to
the page just as in the above example as well. However, I am trying to
get it to load the view state, and those methods are never called
either, it's like it isn't a System.Web.Control at all...

Any ideas?

May 30 '06 #1
0 1377

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: dx | last post by:
I have the Microsoft Press: Developing Microsoft ASP.NET Server Controls and Components book. It's starting to shine some light on control development but there is something about composite...
3
by: Martin | last post by:
Hi, I have created a composite control that has a number of standard asp.net controls on it that can themselves cause postbacks. What i need to do in my composite control is to determine which...
6
by: Shimon Sim | last post by:
I have Panel control on the page. I am handling Init event for it. It doesn't seem to fire at all. Why? Thank you Shimon.
0
by: Beavis | last post by:
I hate to repost a message, but I am still at the same point where I was when I originally posted, and hopefully someone else will see this one... Ok, so I have gone off and documented the...
3
by: Beavis | last post by:
I hate to repost a message, but I am still at the same point where I was when I originally posted, and hopefully someone else will see this one... Ok, so I have gone off and documented the...
1
by: shantanu_kush | last post by:
Hi there, I am using a DataList in a composite control. The DataList has an Custom ItemTemplate(ITemplate) which adds a Button to the DataList Item as shown in the code below : public class...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.