adding a handler to child component's event in design-time

Discussion in 'ASP .Net Web Controls' started by Slavcho, Apr 3, 2008.

  1. Slavcho

    Slavcho Guest

    Hi all,

    I have this problem:

    A web control contains a child component exposed as a property, and the
    component declares a few events. The event list in the VS property grid
    correctly displays the child events under an expandable section.
    However, double-clicking an event of the child component does not create
    a handler in the code-behind, while it works for the top-level control.

    Any ideas whether I should use attributes, a custom designer, or
    something else to enable attaching a handler to the child component? It
    seems the IDE has some support for this scenario, since it successfully
    lists the child-component events.

    Thanks for any hints.
     
    Slavcho, Apr 3, 2008
    #1
    1. Advertising

  2. Slavcho

    Slavcho Guest

    The same setup work fine in Windows Forms. The property that returns the
    constituent component has the [DesignerSerializationVisibility.Content]
    attribute applied. Its events can be expanded when the event tab is
    opened in the properties window, and double-clicking a constituent event
    adds an event handler when in WinForms project. Can anyone suggest how
    to make this work in ASP.NET?

    Thanks.
     
    Slavcho, Apr 9, 2008
    #2
    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. Earl Teigrob
    Replies:
    1
    Views:
    5,879
    Earl Teigrob
    Jun 16, 2004
  2. Jeff Rodriguez
    Replies:
    23
    Views:
    1,200
    David Schwartz
    Dec 9, 2003
  3. Replies:
    1
    Views:
    750
    Damien
    Feb 22, 2007
  4. caldera

    Placeholder child of child control event problem.

    caldera, May 27, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    225
  5. matt del vecchio

    Adding control & Event Handler at run-time

    matt del vecchio, Jan 23, 2004, in forum: ASP .Net Web Controls
    Replies:
    6
    Views:
    192
    matt del vecchio
    Jan 23, 2004
Loading...

Share This Page