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. Advertisements

  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. Advertisements

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. =?Utf-8?B?QW5kcmV3IFdpZWQ=?=

    Adding event handler for dynamically created controls

    =?Utf-8?B?QW5kcmV3IFdpZWQ=?=, Apr 19, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,615
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Apr 25, 2004
  2. Earl Teigrob
    Replies:
    1
    Views:
    6,145
    Earl Teigrob
    Jun 16, 2004
  3. Laurent Bugnion
    Replies:
    1
    Views:
    10,435
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jan 21, 2006
  4. Jeff Rodriguez
    Replies:
    23
    Views:
    1,519
    David Schwartz
    Dec 9, 2003
  5. Replies:
    1
    Views:
    940
    Damien
    Feb 22, 2007
  6. flamesrock
    Replies:
    8
    Views:
    785
    Hendrik van Rooyen
    Nov 24, 2006
  7. caldera

    Placeholder child of child control event problem.

    caldera, May 27, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    357
  8. 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:
    295
    matt del vecchio
    Jan 23, 2004
Loading...