Asp.net mvc 2 默认模型绑定器

Asp.net mvc 2 默认模型绑定器,asp.net-mvc-2,defaultmodelbinder,Asp.net Mvc 2,Defaultmodelbinder,基本上我有一个大约有100个元素的表单。当我提交表单时,这些值绑定到我的模型。但是我想在设置值之前处理表单元素的某些值。基本上,我希望表单中95个元素的值由默认活页夹设置,但我希望在设置之前处理5个元素的值 关于如何通过覆盖默认模型绑定器来实现这一点,有什么建议吗?我可以通过覆盖BindProperty(ControllerContext ControllerContext、ModelBindingContext bindingContext、System.ComponentModel.Prop

基本上我有一个大约有100个元素的表单。当我提交表单时,这些值绑定到我的模型。但是我想在设置值之前处理表单元素的某些值。基本上,我希望表单中95个元素的值由默认活页夹设置,但我希望在设置之前处理5个元素的值


关于如何通过覆盖默认模型绑定器来实现这一点,有什么建议吗?

我可以通过覆盖BindProperty(ControllerContext ControllerContext、ModelBindingContext bindingContext、System.ComponentModel.PropertyDescriptor PropertyDescriptor)来实现同样的效果通过覆盖DefaultBinder中的BindProperty(ControllerContext ControllerContext、ModelBindingContext bindingContext、System.ComponentModel.PropertyDescriptor PropertyDescriptor)函数,我可以实现相同的功能