ASP.NET MVC 3 ValidateRequest(false) not working with FormCollection

后端 未结 3 1790
轻奢々
轻奢々 2020-12-03 17:07

FYI I am using .NET 4.0 / MVC 3.

In my controller, the following is my code:

[HttpPost]
[ValidateInput(false)]
public ViewResult Edit(ContentTemplate         


        
3条回答
  •  眼角桃花
    2020-12-03 17:44

    If you are using custom model binders and [ValidateInput(false)] is not working then you might find a solution here: http://blogs.taiga.nl/martijn/2011/09/29/custom-model-binders-and-request-validation/

提交回复
热议问题