Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: ToolboxData and {0}

4 views
Skip to first unread message

Unknown

unread,
Jul 13, 2006, 10:58:23 AM7/13/06
to
On Thu, 13 Jul 2006 09:40:09 -0500, Kevin Donn wrote:

> What is all this {0} and cc1 for? Why isn't it sufficient for the designer
> to simply say <TMyClass> and be done with it? I realize this is a nuts &
> bolts question, but I'm trying to understand the nuts and bolts a little
> better so I can make good decisions.

The simple answer is that each control set is given a namespace (at
the top of each page). I assume this is to prevent collisions with
other controls as well as XML/HTML element names.

--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com

Kevin Donn

unread,
Jul 13, 2006, 10:40:09 AM7/13/06
to
I've been tinkering with making my own web control that inherits CheckBox.
I've got it coded and it appears in my Tool Palette, but I noticed when I
drop one on my WebForm the tag has a prefix of "cc1:" before the class name,
like <cc1:TMyClass>. I understand that in my class definition, the
following attribute is in play:

[ToolboxData('<{0}:TMyClass runat=server></{0}:TMyClass>')]

What is all this {0} and cc1 for? Why isn't it sufficient for the designer
to simply say <TMyClass> and be done with it? I realize this is a nuts &
bolts question, but I'm trying to understand the nuts and bolts a little
better so I can make good decisions.

Thanks,
Kevin Donn


Kevin Donn

unread,
Jul 13, 2006, 11:12:14 AM7/13/06
to
I guess the "cc1" corresponds to the "asp" that occurs in the tags for
asp.net controls, like <asp:checkbox>. Do you know whether the programmer
has any control over what prefix is used for his own controls, i.e. can I
make it use "lw" instead of "cc1", or should I just not care about any of
this?

Thanks,
Kevin Donn

"Marc Rohloff [TeamB]" <"on request"> wrote in message
news:41u3erqz...@dlg.marcrohloff.com...

Nick Hodges (Borland/DevCo)

unread,
Jul 13, 2006, 12:22:28 PM7/13/06
to
Kevin Donn wrote:

> Do you know whether the programmer has any control over what prefix
> is used for his own controls, i.e. can I make it use "lw" instead of
> "cc1", or should I just not care about any of this?

Yes -- for my NixBlox components, I use

[assembly: TagPrefix('Lemanix.Web.NixBlox', 'nixblox')]

in the DPR file, and my components use the <nixblox:control> tags.

--
Nick Hodges
Delphi/C# Product Manager - Borland/DevCo
Read my Blog -- http://blogs.borland.com/nickhodges

Kevin Donn

unread,
Jul 13, 2006, 3:39:02 PM7/13/06
to
Thanks, guys. That cc1 was bothering me...

kd

"Nick Hodges (Borland/DevCo)" <nickh...@gmail.com> wrote in message
news:44b67344$1...@newsgroups.borland.com...

0 new messages