Now, if there is a technical reason why this isn't a good idea, I love to know it, as I use this technique pretty often.
There's no guarantee that the static constructor has run before the mapping dictionary is consumed by the validation provider. (It's perfectly valid for us to start caching entries, for example, and the static constructor can run
after we've built up this cache.) The fact that this works in MVC 2 is solely an implementation detail, and it's not guaranteed to hold going forward.
Marked as answer by ricka6 on Mar 26, 2010 06:40 PM
levib
Star
7702 Points
1099 Posts
Microsoft
Re: AJAX.BeginForm and Html.ValidationSummary
Mar 23, 2010 06:18 PM|LINK
There's no guarantee that the static constructor has run before the mapping dictionary is consumed by the validation provider. (It's perfectly valid for us to start caching entries, for example, and the static constructor can run after we've built up this cache.) The fact that this works in MVC 2 is solely an implementation detail, and it's not guaranteed to hold going forward.