Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Could you please decorate it with design time attributes?

Reply
Thread Tools

Could you please decorate it with design time attributes?

 
 
Umut Tezduyar
Guest
Posts: n/a
 
      11-22-2005
I really hate working with .net framework design time attributes. I have
read asp.net server controls and components (Nikhil Kothari, Vandana Datye)
book, chapter 15 but still i can't handle the complex tasks on designer. The
thing i want to do is so simple (I hope so). I want my control to understand
the Menu and SubMenus under Menu. Ex:

<cc1:MyConrol runat="server" id="MyControl1">
<Menu name="level1">
<SubMenus>
<Menu name="level2">
<SubMenus>
<Menu name="level3"/>
</SubMenus>
</Menu>
<Menu name="level4"/>
</SubMenus>
</Menu>
</cc1:MyControl>

It should parse child controls and also by using the property browser, i
should add 'Menu' and 'SubMenus' to my control. Should i use
'ExpandableObjectConverter' for my MyControl control?

Could you please fully decorate this control and Menu to give a full design
time support?

Here is the code:

[ToolboxData("<{0}:MyControl runat=server></{0}:MyControl>")]
public class MyControl : System.Web.UI.Control
{
private Menu _menu;

// This is not the only propery. Not DefaultInnerPropery
public Menu Menu
{
get
{
return this._menu;
}
set
{
this._menu = value;
}
}
}

// This is not a control
public class Menu
{
private string _name;

// Menu collection is a collection only holds Menu in it.
private MenuCollection _subMenus;

public Menu()
{

}

public string Name
{
get
{
return this._name;
}
set
{
this._name = value;
}
}

public MenuCollection SubMenus
{
get
{
return this._subMenus;
}
set
{
this._subMenus = value;
}
}

}

Thank you for spending time on it.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A Sort Optimization Technique: decorate-sort-dedecorate xahlee@gmail.com Java 10 09-08-2006 10:56 AM
A Sort Optimization Technique: decorate-sort-dedecorate xahlee@gmail.com Python 18 09-08-2006 10:56 AM
Extend or Decorate? Roger Varley Java 3 01-18-2006 07:19 PM
In-place decorate-sort-undecorate - best implementation? Tom Anderson Python 1 08-03-2005 05:12 PM
Improving upon the Decorate-Sort-Undecorate idiom Thomas Philips Python 2 06-23-2004 04:06 AM



Advertisments