Add [ValidateInput (false)] to the top of the request method.
From the client (content= "
Sdfdddd
A potentially dangerous request.form value was detected in the. Description: ASP. NET has detected potentially dangerous data in the request because it may include HTML tags or scripts. This data may indicate an attempt to compromise application security, such as cross-site scripting attacks. If this type of input applies to your application, you can include code from pages that are explicitly allowed. For more information, see http://go.microsoft.com/fwlink/?LinkID=212874.
Exception Details: System.Web.HttpRequestValidationException: From the client (content= "
Sdfdddd
A potentially dangerous request.form value was detected in the.
Previously, you could disable request validation by setting validaterequest= "false" in the page directive or configuration section when using ASPX pages.
However, the use of MVC (Razor) is not valid. Notice the search that you only need to add validateinput (false) to the action requested by the page.
Such as:
[ValidateInput (False)]
Public ActionResult AddData () {
.............
}
A potentially dangerous request.form value was detected. Description: ASP. NET has detected potentially dangerous data in the request