473,320 Members | 2,004 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,320 software developers and data experts.

please, add design time attributes to my control.

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;
}
}

}
Nov 23 '05 #1
0 928

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

Similar topics

4
by: Danimal | last post by:
I have been using PHP for a long time... since it was called PHP/FI. I have a programming design question: Let say I have this class: class attrib { var $lenght; var $type; ... }
26
by: Michael Strorm | last post by:
Hi! I posted a message a while back asking for project suggestions, and decided to go with the idea of creating an adventure game (although it was never intended to be a 'proper' game, rather an...
9
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
0
by: scpedicini | last post by:
Okay, I've been having a problem with custom design-time properties that has been driving me nuts for about a week. The control that I'm working on extends System.Windows.Forms.AxHost, but I'm...
0
by: Edward Diener | last post by:
In Borland's VCL it was possible to divide a component into design time and run time DLLs. The design time DLL would only be necessary when the programmer was setting a component's properties or...
3
by: Sky Sigal | last post by:
I coming unglued... really need some help. 3 days chasing my tail all over MSDN's documentation ...and I'm getting nowhere. I have a problem with TypeConverters and storage of expandableobjects...
17
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but...
0
by: Umut Tezduyar | last post by:
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...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.