I have on my model:
public class EmailTemplateModel
{
public int EmailTemplateId { get; set; }
[Required]
public string Name { get; set; }
[Required]
public string Subject { get; set; }
[AllowHtml]
[Required]
public string Content { get; set; }
}
And on my controller:
[ValidateInput(false)]
public ActionResult AddNewTemplate(EmailTemplateEditorModel model)
{
}
But I get the following error:
The potentially dangerous Request.Form value was detected by the client
Why am I getting these errors, although this check should be disabled using the ValidateInput / AllowHtml attributes? If you look at other posts, it is unclear if I need both or only one of these attributes ...
jaffa source
share