更改asp.net MVC中的默认模型绑定器

wha*_*ave 34 asp.net-mvc

有什么办法可以将默认的ModelBinder设置为我自己的吗?

Pac*_*aco 58

ModelBinders.Binders.DefaultBinder = new MyOwnModelBinder();
Run Code Online (Sandbox Code Playgroud)

  • 我相信...在 MvcApplication.Application_Start() (2认同)