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.
I like to know the order of the execution of the different ValueProviders
in ASP.NET MVC.
ValueProviders:
I did not find an information.
If memory serves me, the priority is like this.
EDIT I appear to be in agreement with the following website, which lists the same order. http://www.howmvcworks.net/OnModelsAndViewModels/TheBeautyThatIsTheModelBinder
You can check this out from ASP.NET MVC source code: ValueProviderFactories.cs
Here is the predefined order for ValueProviders:
private static readonly ValueProviderFactoryCollection _factories = new ValueProviderFactoryCollection()
{
new ChildActionValueProviderFactory(),
new FormValueProviderFactory(),
new JsonValueProviderFactory(),
new RouteDataValueProviderFactory(),
new QueryStringValueProviderFactory(),
new HttpFileCollectionValueProviderFactory(),
};
© 2022 - 2024 — McMap. All rights reserved.