Last post Oct 25, 2010 09:03 AM by micmac
May 16, 2008 05:16 PM|DinuA|LINK
I am using VB 2008 SP1.
I have generated a website using the
Dynamic Data Website Wizard.
In the file
<ContextName>PartialClass.vb I want to add attributes to the objects representing fields, such as:
The first one is rejected with the message: “Attribute ‘DisplayNameAttribute’ cannot be applied to ‘_BSELcode’ because the attribute is not valid on this declaration type”.
What am I doing wrong?
Where can I find a list of all acceptable attributes for fields?
May 16, 2008 10:17 PM|davidebb|LINK
You'll need to make it a property instead of a field in order to use the attribute on it.
May 17, 2008 03:56 AM|DinuA|LINK
Thanks David, indeed it works. Actually the properties were also generated in that file but I didn't see them[:(]
May 17, 2008 04:12 PM|maira.wenzel|LINK
You can see a list of all Dynamic Data attributes in my blog post:
The list contains all attributes not only the ones that apply to fields.
I hope it helps.
May 17, 2008 04:39 PM|DinuA|LINK
Thank you very much Maira.
Oct 25, 2010 09:03 AM|micmac|LINK
How do you make it a property instead of a field?