Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC: Order of execution of ValueProviders

I like to know the order of the execution of the different ValueProviders in ASP.NET MVC.

ValueProviders:

  • QueryStringValueProvider
  • RouteDataValueProvider
  • FormValueProvider
  • ...

I did not find an information.

like image 407
Rookian Avatar asked Dec 18 '12 16:12

Rookian


1 Answers

If memory serves me, the priority is like this.

  1. Form data in the request
  2. Route data
  3. Query String
  4. Http File Collection

EDIT I appear to be in agreement with the following website, which lists the same order. http://www.howmvcworks.net/OnModelsAndViewModels/TheBeautyThatIsTheModelBinder

like image 101
KingCronus Avatar answered Oct 15 '22 01:10

KingCronus