Questions tagged «custom-model-binder»

5
ASP.NET MVC使用自定义Modelbinder时从客户端检测到潜在危险的Request.Form值
在这里得到错误: ValueProviderResult value = bindingContext.ValueProvider.GetValue("ConfirmationMessage"); 如何只允许选择值?即 [ValidateInput(false)] public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { ValueProviderResult value = bindingContext.ValueProvider.GetValue("ConfirmationMessage"); ValueProviderResult value2 = bindingContext.ValueProvider.GetValue("ConfirmationMessage2"); }
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.