Author: Angle Bracket Percent : ASP.NET | Posted on: 7/24/2009 6:31:00 PM | Views : 1219

A while back, I blogged about how ASP.NET Dynamic Data apps can uses an Associated Metadata class (aka a ?buddy? class) to add metadata attributed to properties defined in a generated class. It?s a mostly ugly thing that was made necessary by limitations of the C# and VB.NET languages: they don?t let you add attributes to properties defined in another partial class. What I didn?t mention there is that this ?buddy? class mechanism is actually not specific to Dynamic Data apps, and can in fact be used anywhere. Since I?ve recently heard of several cases of users trying to do something similar, I?ll describe how it?s done. If you?re familiar with TypeDescriptionProviders (which have been around since ancient times), this will look very trivial...(read more) ...

Go to the complete details ...