Asp – trying to submit rich text editor content in asp.net mvc and getting “potentially dangerous Request.Form value was detected”

asp.net-mvctinymcevalidation

I am using TinyMCE in asp.net mvc and getting the error message "a potentially dangerous Request.Form value was detected" when trying to save the text from the TinyMCE editor.
I set ValidateRequest="false" both in web.config and on the page. Any ideas?

Best Answer

Just add the ValidateInput attribute to your action and set it to false.

Like this.

[ValidateInput(false)]
public ActionResult Submit(string FormContent)
{

}