0

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.

Rookian
  • 19,841
  • 28
  • 110
  • 180

1 Answers1

2

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.
Community
  • 1
  • 1
Bhalchandra K
  • 2,631
  • 3
  • 31
  • 43
  • Thanks! This also solved my problem that Data-annotated errors were not translated (because I did set the Culture in a filter). – kloarubeek Feb 25 '14 at 23:31