473,386 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Could you please decorate it with design time attributes?

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.
Nov 23 '05 #1
0 1043

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

41
by: John Marshall | last post by:
How about the following, which I am almost positive has not been suggested: ----- class Klass: def __init__(self, name): self.name = name deco meth0: staticmethod def meth0(x):
7
by: Jonathan Fine | last post by:
Giudo has suggested adding optional static typing to Python. (I hope suggested is the correct word.) http://www.artima.com/weblogs/viewpost.jsp?thread=85551 An example of the syntax he proposes...
1
by: Tom Anderson | last post by:
Subtitle: the war on temporary objects continues! The page on python performance tips on the python.org wiki (<http://wiki.python.org/moin/PythonSpeed/PerformanceTips>) suggests the following...
1
by: Michal Piatkowski | last post by:
I have a problem with serialization of a polymorphic array. It has attributes defined XmlArray and XmlArrayItem for XML serialization. The attribute specifies Type1 but as my array is polymorphic...
0
by: Paul Rees | last post by:
I am wondering if anyone has encountered a similar problem to the one that I am having. I have an ASP.NET page which has a table and a dropdownlist that was added at design time. The majority of...
5
by: Prakash | last post by:
Hi Friends, While i am searching the c# interview questions in the internet, i got the following questions for Architect level. Please give me the answer for the following questions. (i hope i...
118
by: 63q2o4i02 | last post by:
Hi, I've been thinking about Python vs. Lisp. I've been learning Python the past few months and like it very much. A few years ago I had an AI class where we had to use Lisp, and I absolutely...
18
by: xahlee | last post by:
Last year, i've posted a tutorial and commentary about Python and Perl's sort function. (http://xahlee.org/perl-python/sort_list.html) In that article, i discussed a technique known among...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.