Adding custom attributes to elements

  • Thread starter Thread starter Paul Dunstone
  • Start date Start date
P

Paul Dunstone

Hi group

I am trying to add a custom attribute to all .NET elements such as
textboxes, labels, datagrids etc. I want to add an attribute called
'key'. I already have the code working for the key attribute (it is
used to localise text within the element) but .NET reports that the
attribute is not valid.

Although the code works I would prefer not to get the warning each
time myself or one of the other coders use the key attribute. Is
there a way I can add the key attribute to all elements so that a
warning is not given?

Thanks for any help you can offer

Paul
 
Paul,

When you do something, and ask for help, please explain for what.

Datagrids, labels, textboxes have the name Controls, so what are "Elements".

You need something however does not write for what it is only to find text
however where, you keep it again in ridle?

One thing I understand you have named something "key"

And than you ask help, because it gives an error somewhere when the "key" is
used whatever you mean with that.

Cor
 
Hi group

Apologies, I thought what I wrote would be sufficient.

I am using the Microsoft Localisation Toolkit within my current
project. The key attribute is used for all controls such as textboxes,
drop down lists etc and is used to identify what text to retrieve from
the database.

However, when using the key attributes the following warning (not an
error Cor) is given:
"Could not find any attribute 'key' of element 'Label'"

Therefore, is there a way to stop .NET giving a warning every time I
wish to use the attribute 'key'? Is there a way of adding custom
attributes to controls without warnings?

Thanks for any help
 
Back
Top