Having the following view model in my ASP.NET MVC 3 application, I have a problem described below:
public class MyViewModel : ViewModelBase
{
// having this line kills the one below it, while commenting it out solves the problem. WHY?
[DataType(DataType.Text)]
[Display(Name = "Name", Description = "Description", Prompt = "Prompt"]
public new string MyField { get; set; }
}
As soon as I comment out [DataType(DataType.Text)]
I can see all other things appear, but if used together, DataType.Text is kind of overriding one below it (at least it seems like it).
Why is this happening and how to workaround?
Thanks in advance.