views:

17

answers:

0

I'm sending a DTO over wire (WCF) which has on one property the DisplayName atribute from System.ComponentModel and on a other one the ScaffoldColumn attribute. On the client I have a ASP.NET MVC 2 app and I use the Html.EditorFor(x=>x.DTO) extension method.When the page is rendered it looks like the attributes wasn't there.

The DTO

[Serializable]
public class ProjektDTO : IDTO
{
    public decimal Id { get; private set; }

    public string Poznamka { get; set; }

    [DisplayName("Tralal")]
    public string Oz { get; set; }

    [ScaffoldColumn(false)]
    public string Name { get; set; }
}

Is this even possible ?

EDIT

I found the problem.It works now. But anyway,is this a ok or should I avoid doing this ??