Изменение привязки модели по умолчанию в asp.net MVC Можно ли каким-либо образом установить DefaultBinder по умолчанию на свой собственный? Ответ 1 ModelBinders.Binders.DefaultBinder = new MyOwnModelBinder(); Ответ 2 В Global.asax.cs: public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { //... ModelBinders.Binders.DefaultBinder = new MyModelBinder(); } }
Ответ 2 В Global.asax.cs: public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { //... ModelBinders.Binders.DefaultBinder = new MyModelBinder(); } }