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

后端 未结 3 1796
轻奢々
轻奢々 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:58

    I just installed ASP.NET MVC 3 RC2, and this bug has been fixed. The following code works as expected now.

    [HttpPost]
    [ValidateInput(false)]
    public ViewResult Edit(FormCollection form)
    {
    }
    

提交回复
热议问题