Skip to content Skip to sidebar Skip to footer

Mvc3 C# Potentially Dangerous Request Error

I have an MVC3 C#. Web App. One of our properties uses an RTF control for our TextBoxFor controls: @Html.TextAreaFor(model => model.SowDescription,

Solution 1:

Try decorating the SowDescription viewmodel property with the [AllowHtml] attribute.

Solution 2:

In your model,before SowDescription definition add this

 [AllowHtml]

You need System.Web.Mvc reference for using it

Solution 3:

Simply write: UI:

CKEDITOR.replace('Description', { toolbar: '1', htmlEncodeOutput: true});

Controller:

model.Body = System.Net.WebUtility.HtmlDecode(model.Body);

Post a Comment for "Mvc3 C# Potentially Dangerous Request Error"