Nested Composite Controls

Discussion in 'ASP .Net Building Controls' started by Aaron Dunfield, Jul 29, 2003.

  1. I have built a composite control that takes in XML and creates
    controls based on the XML. One of the controls that this composite
    control creates is itself a composite control. The problem that I am
    running into is that the second composite control is not receiving any
    events. If I use this second control on it's own on a page it
    receives the event just fine but if it is nested within the first
    composite control it doesn't receive the event. Has anyone else run
    into this?

    Thanks,

    Aaron
     
    Aaron Dunfield, Jul 29, 2003
    #1
    1. Advertising

  2. (Aaron Dunfield) wrote in message news:<>...
    > I have built a composite control that takes in XML and creates
    > controls based on the XML. One of the controls that this composite
    > control creates is itself a composite control. The problem that I am
    > running into is that the second composite control is not receiving any
    > events. If I use this second control on it's own on a page it
    > receives the event just fine but if it is nested within the first
    > composite control it doesn't receive the event. Has anyone else run
    > into this?
    >
    > Thanks,
    >
    > Aaron


    I think I have figured out my problem. In the second composite
    control that is being created by the first one I changed the method
    signature of the Event from Private to Internal. Then in the first
    custom control when I create the second custom control I also create a
    new event handler to handle the event that was causing the problem.
    So far so good....

    A.
     
    Aaron Dunfield, Jul 30, 2003
    #2
    1. Advertising

  3. I ran into the same problem and solved id by force-assigning an ID to the
    composite control. This way, when the page-load is done, you are sure to
    make the right correspondance and have your events thrown.

    JP

    "Aaron Dunfield" <> a écrit dans le message de news:
    ...
    > (Aaron Dunfield) wrote in message

    news:<>...
    > > I have built a composite control that takes in XML and creates
    > > controls based on the XML. One of the controls that this composite
    > > control creates is itself a composite control. The problem that I am
    > > running into is that the second composite control is not receiving any
    > > events. If I use this second control on it's own on a page it
    > > receives the event just fine but if it is nested within the first
    > > composite control it doesn't receive the event. Has anyone else run
    > > into this?
    > >
    > > Thanks,
    > >
    > > Aaron

    >
    > I think I have figured out my problem. In the second composite
    > control that is being created by the first one I changed the method
    > signature of the Event from Private to Internal. Then in the first
    > custom control when I create the second custom control I also create a
    > new event handler to handle the event that was causing the problem.
    > So far so good....
    >
    > A.
     
    Jean-Philippe Gouigoux \(MGDIS\), Jul 30, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sleigh
    Replies:
    1
    Views:
    2,694
    sleigh
    Feb 12, 2004
  2. dx
    Replies:
    10
    Views:
    950
    John Saunders
    Apr 11, 2004
  3. Chad
    Replies:
    0
    Views:
    225
  4. Greg Woods
    Replies:
    2
    Views:
    1,154
    Peter Bucher [MVP]
    Apr 1, 2008
  5. Mike

    Composite vs non composite Controls

    Mike, Mar 10, 2005, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    266
    Sundararajan
    Mar 11, 2005
Loading...

Share This Page