ASP.NET MVC-A potentially dangerous Request was detected from the client

Exception Details: System.Web.HttpRequestValidationException: [HttpRequestValidationException (0x80004005)


A potentially dangerous Request.Form value was detected from the client (Model_Field="<!-- Begin ...")


Source Error :
An unhanded exception was generated during the execution of the current web request.
Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Description: ASP.NET MVC has detected data in the request that is potentially dangerous because it might include HTML markup or script.
The data might represent an attempt to compromise the security of your application, such as a cross-site scripting attack. If this type of input is appropriate in your application, you can include code in a web page to explicitly allow it. For more information, see





To fix this you will need to add ValidateInput attribute as shown below.
[HttpPost, ValidateInput(false)]
public ActionResult Edit(FormCollection collection)
// ...