ASP.NET MVC A potentially dangerous Request.Form value was detected from the client when using a custom modelbinder

前端 未结 5 1907
感情败类
感情败类 2020-11-29 18:44

Getting the error here:

ValueProviderResult value = bindingContext.ValueProvider.GetValue(\"ConfirmationMessage\");

How do I allow on a sel

5条回答
  •  甜味超标
    2020-11-29 19:37

    Try:

    HttpRequestBase request = controllerContext.HttpContext.Request;
    string re = request.Unvalidated.Form.Get("ConfirmationMessage")
    

提交回复
热议问题