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

S

Slavcho

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

Slavcho

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top