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

overriding ID tag

0 views
Skip to first unread message

Marco Caspers

unread,
Jan 19, 2006, 6:27:11 PM1/19/06
to
Hi Folks,

I've ran into an issue where i want to override the ID tag that's
rendered for my web control in the aspx page.

What i get now is:

<abc:TMyCTRL id="TMyCTRL1" runat="server"></abc:TMyCTRL>

What i want is:

<abc:TMyCTRL id="MyCTRL1" runat="server"></abc:TMyCTRL>

Why do i want this, well the name in the ID tag is the same name that
returns in the sourcecode.

Since all my components have the normal Delphi T prefix, i don't want
the name of the actual component to start with the T (just like in
regular vcl win32 delphi).

I do not exactly know where in the webcontrol (I'm inheriting from
System.Web.UI.WebControls.WebControl) the ID tag that's rendered in the
designer (in aspx page).

My thoughts is that the property UniqueID has something to do with this.
But this property is readonly, and i haven't found a way yet to
overrride it.

Does anyone have an idea how to accomplish this?

Fwiw i also have an IDesigner to add designtime behaviour to the
component. (Although currently i'm rendering exactly the same thing as
with runtime).

The component itself works fine, it's only that one last 'beauty'
enhancement that i can't solve right now.

Regards,
Marco.

--

0 new messages