473,772 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
'ExpandableObje ctConverter' 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.C ontrol
{
private Menu _menu;

// This is not the only propery. Not DefaultInnerPro pery
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 1061

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

Similar topics

41
2875
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
2209
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 is: > def f(this:that=other): > print this This means that f() has a 'this' parameter, of type 'that'. And 'other' is the default value.
1
1355
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 code for sorting a list using decorate-sort-undecorate, but doing it in-place: def sortby_inplace(somelist, n): somelist = , x) for x in somelist] somelist.sort()
1
2191
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 I really want to have more than one type inside of it. So I have objects of Type2, Type3, etc. which inherit from Type1. They are in my array. To be able to serialize the array, I would need to supply all the types (Type2, Type3, etc...) as...
0
3530
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 the rows in the table are then generated at run-time based on a SQL query from a Jet database, and similarly the dropdownlist is filled at run-time Then I follow these steps 1. Loop through the records returned by the OleDbDataReade 2. Setup a...
5
2526
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 posted this question in the right group. if not, please forgive me) What's wrong with a line like this? DateTime.Parse(myString);
118
6743
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 hated it, having learned C++ a few years prior. They didn't teach Lisp at all and instead expected us to learn on our own. I wasn't aware I had to uproot my thought process to "get" it and wound up feeling like a moron. In learning Python I've...
18
2343
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 juvenile Perlers as the Schwartzian Transform, which also manifests in Python as its “key” optional parameter. Here, i give a more detailed account on why and how of this construct. ----
2
6967
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 attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
0
9621
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2851
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.