I have an existing class in an MVC4 project (also using EF 4) that I need to set for the [AllowHtml] DataAnnotation parameter. I already have annotations on several properties of this class (i.e. Mandatory display), which work fine. The corresponding libraries are included:
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema;
However, an error message appears:
Unable to resolve symbol [AllowHtml]
Here is the code. The first two annotations work. Third, no. I tried to install it separately from others, which did not matter. What am I missing?
[Display(Name = "Title"), Required, AllowHtml] public string Title { get; set; }
source share