Last day i ran into an issue related to the DefaultValueProvider. So here's the scenario:
I had a class library project which was created using framework v.2.0. After a while we decided to convert it to a v.3.5 project. All went fine until we started implementing value providers. Aparently DefaultValueProvider is part of the System.Web.Mvc dll,
which by the way is included in the project referencesk but somehow the compiler doesn't seem to find the reference and just keeps on telling "missing assembly reference".
Ok, my bad here...problem was solved. VS2008 somehow mixed up my reference to System.Web.Mvc and was referencing the dll from preview 4 instead of the one from the beta release.
And alberto, contrary to what you say DefaultValueProvider class does exist!
DefaultValueProvider Class doesn't exist: when Scott say "defaultValueProvider" is meaning the default way values are retrived, using Getvalue from FormCollection.
Shinkun
preview 4 instead of the one from the beta release.
Either my eyes are deceiving me or does it say "class System.Web.Mvc.DefaultValueProvider" right under DefaultValueProvider. And no, i did not implement my own DefaultValueProvider...
just to let you know that it really does exist! And believe me...it can be very useful :P
As of the RC, there is no DefaultValueProvider type. Please use ValueProviderDictionary instead. If your code references the DefaultValueProvider type, you are using an old codebase and an obsolete type.
Shinkun
Member
33 Points
22 Posts
Where did DefaultValueProvider gone to?!
Feb 09, 2009 11:14 AM|LINK
Hi everyone,
Last day i ran into an issue related to the DefaultValueProvider. So here's the scenario:
I had a class library project which was created using framework v.2.0. After a while we decided to convert it to a v.3.5 project. All went fine until we started implementing value providers. Aparently DefaultValueProvider is part of the System.Web.Mvc dll, which by the way is included in the project referencesk but somehow the compiler doesn't seem to find the reference and just keeps on telling "missing assembly reference".
Help needed
mvc .net 3.5 DefaultValueProvider System.Web.Mvc
alberto.ferr...
Member
410 Points
97 Posts
Re: Where did DefaultValueProvider gone to?!
Feb 09, 2009 03:22 PM|LINK
Hi,
There's no "DefaultValueProvider":
Shinkun
Member
33 Points
22 Posts
Re: Where did DefaultValueProvider gone to?!
Feb 09, 2009 03:45 PM|LINK
Ok, my bad here...problem was solved. VS2008 somehow mixed up my reference to System.Web.Mvc and was referencing the dll from preview 4 instead of the one from the beta release.
And alberto, contrary to what you say DefaultValueProvider class does exist! Reference to that class can be seen in Scott Hanselman's blog (here: http://www.hanselman.com/blog/TheWeeklySourceCode28ASPNETMVCBetaObscurityModelStateIsValidIsFalseBecauseModelBinderPullsValuesFromRouteData.aspx)
Anyway thanks for time and help :)
alberto.ferr...
Member
410 Points
97 Posts
Re: Where did DefaultValueProvider gone to?!
Feb 09, 2009 04:18 PM|LINK
Glad to know that you solve it.
DefaultValueProvider Class doesn't exist: when Scott say "defaultValueProvider" is meaning the default way values are retrived, using Getvalue from FormCollection.
MVC is on RC development stage (after Beta).
Shinkun
Member
33 Points
22 Posts
Re: Where did DefaultValueProvider gone to?!
Feb 09, 2009 05:02 PM|LINK
Either my eyes are deceiving me or does it say "class System.Web.Mvc.DefaultValueProvider" right under DefaultValueProvider. And no, i did not implement my own DefaultValueProvider...
just to let you know that it really does exist! And believe me...it can be very useful :P
mvc DefaultValueProvider
levib
Star
7702 Points
1099 Posts
Microsoft
Re: Where did DefaultValueProvider gone to?!
Feb 09, 2009 05:39 PM|LINK
Hello Shinkun -
As of the RC, there is no DefaultValueProvider type. Please use ValueProviderDictionary instead. If your code references the DefaultValueProvider type, you are using an old codebase and an obsolete type.
Shinkun
Member
33 Points
22 Posts
Re: Where did DefaultValueProvider gone to?!
Feb 09, 2009 10:06 PM|LINK
Once again...my bad! Thank you both for your replies
Guess that from now on i should pay more attention to the updates =) ...and redo some of my code