I have coded a model binder to return a simple model. I want to bind this model to every controllers without change any controller action parameters. Is there anyway to do it?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A model binder is usually associated to a given type. So in your
Application_Start:This will register the
SomeModelBindermodel binder to all controller actions which take aSomeViewModelas parameter. For example: