Home All Groups Group Topic Archive Search About

Making Tag with Web.UI.Control

Author
13 Jul 2006 2:51 PM
Ros
Group,


Is there anyway to create a tag on a Web.UI.Control?

Lets say the label, can i add a Tag (property) like Common Form Controls have.

How does rending work? would i be able to use that to over ride the property
and add a custom tag?

I would like to add the tag so i can include the parameters on the
particular tag... so when i call a parameter SQL statement... i can use the
loop or do condition untill it finds the parameter value for that particular
control by using the tag string (parsing it or tag.contain(strSearch))

Any help or point me to the right direction would be greatly appreciated.


Thanks in advance.



Ros

Author
13 Jul 2006 5:43 PM
GhostInAK
Hello Ros,

Overriding .Tag is NOT a good idea.  People expect .Tag to be under their
control.. not the control's control.  Create a new property to hold your
crap.

-Boo

Show quoteHide quote
> Group,
>
> Is there anyway to create a tag on a Web.UI.Control?
>
> Lets say the label, can i add a Tag (property) like Common Form
> Controls have.
>
> How does rending work? would i be able to use that to over ride the
> property and add a custom tag?
>
> I would like to add the tag so i can include the parameters on the
> particular tag... so when i call a parameter SQL statement... i can
> use the loop or do condition untill it finds the parameter value for
> that particular control by using the tag string (parsing it or
> tag.contain(strSearch))
>
> Any help or point me to the right direction would be greatly
> appreciated.
>
> Thanks in advance.
>
> Ros
>
Author
13 Jul 2006 6:46 PM
Ros
Boo,

When you mentioned "Create a new property", did you mean create a custom
attribute?

AttributeTargets.Property?


if this is correct, you have greatly helped. Please advice.

Thanks again in advance.


Ros

Show quoteHide quote
"GhostInAK" wrote:

> Hello Ros,
>
> Overriding .Tag is NOT a good idea.  People expect .Tag to be under their
> control.. not the control's control.  Create a new property to hold your
> crap.
>
> -Boo
>
> > Group,
> >
> > Is there anyway to create a tag on a Web.UI.Control?
> >
> > Lets say the label, can i add a Tag (property) like Common Form
> > Controls have.
> >
> > How does rending work? would i be able to use that to over ride the
> > property and add a custom tag?
> >
> > I would like to add the tag so i can include the parameters on the
> > particular tag... so when i call a parameter SQL statement... i can
> > use the loop or do condition untill it finds the parameter value for
> > that particular control by using the tag string (parsing it or
> > tag.contain(strSearch))
> >
> > Any help or point me to the right direction would be greatly
> > appreciated.
> >
> > Thanks in advance.
> >
> > Ros
> >
>
>
>
Author
13 Jul 2006 9:29 PM
Ros
Boo,


Thanks for your help... i got what you mean by create new property. i did
not realize the attribute method has an add function.

Thanks again.

Ros

Show quoteHide quote
"GhostInAK" wrote:

> Hello Ros,
>
> Overriding .Tag is NOT a good idea.  People expect .Tag to be under their
> control.. not the control's control.  Create a new property to hold your
> crap.
>
> -Boo
>
> > Group,
> >
> > Is there anyway to create a tag on a Web.UI.Control?
> >
> > Lets say the label, can i add a Tag (property) like Common Form
> > Controls have.
> >
> > How does rending work? would i be able to use that to over ride the
> > property and add a custom tag?
> >
> > I would like to add the tag so i can include the parameters on the
> > particular tag... so when i call a parameter SQL statement... i can
> > use the loop or do condition untill it finds the parameter value for
> > that particular control by using the tag string (parsing it or
> > tag.contain(strSearch))
> >
> > Any help or point me to the right direction would be greatly
> > appreciated.
> >
> > Thanks in advance.
> >
> > Ros
> >
>
>
>