RE: Custom webcontrol with reference to another one
- From: Nathaniel Greene <Nathaniel.Greene@xxxxxxxxxxxxxxxx>
- Date: Fri, 19 Jan 2007 22:44:01 -0800
Hello,
You would want to use the
IDReferenceProperty attribute
Seee the below code.
I created 2 classes - MailLink and ToLink. for ToLink there is a property
called Buddy that can be any MailLink. By attachign this attribute and
specifying the type then it will automagically enumerate these for you.
MailLink gBuddy;
[Browsable(true), IDReferenceProperty(typeof(MailLink))]
public MailLink Buddy
{
get { return gBuddy; }
set { gBuddy = value; }
}
"iontichy" wrote:
Hi,.
I've been working on a custom webcontrol with a property that
references another webcontrol from the same page.
In my special test case I have a Person_firstname1 control and a
PersonSource1 control. The Person_firstname1 have a property of the
type PersonSource. Now i want to assign the this property in the visual
studio designer. How could I persuade the designer, to show a dropdown
list of the controls in the page with the correct type (e.g.
PersonSource1, PersonSource2 etc.)
Thanks in advance,
Mirko
- References:
- Custom webcontrol with reference to another one
- From: iontichy
- Custom webcontrol with reference to another one
- Prev by Date: RE: Control with no closing tag
- Next by Date: Setting Inner Tag Content at Design Time programmatically
- Previous by thread: Custom webcontrol with reference to another one
- Next by thread: Control with no closing tag
- Index(es):