Search code examples
c#asp.netasp.net-mvcdefaultmodelbindermodelbinder

When is the DefaultModelBinder invoked within the ASP.NET Pipeline?


I want to know when the DefaultModelBinder is invoked within the ASP.NET Pipeline?

Background: I want to find an approriate place where I can set the cultures of the current thread.


Solution

  • Please check if this stackoverflow questions helps you.

    Abstract from the answers above - There are multiple events which execute before model binding in asp.net mvc, where you can set the culture for current request.

    1. Application Request events like - "PreRequestHandlerExecute".
    2. Extend the Controller base class and override the 'OnActionExecuting'
    3. Create altogether new HttpModule.