In my application, I am trying to split the Date and Time from and DateTime field so I can put a jQuery date picker on the date. I found Hanselman's code for splitting the DateTime, however I get a compile error on bindingContext.ValueProvider.TryGetValue(modelName, out valueResult);
. The error I get is:
Error 3 'System.Web.Mvc.IValueProvider' does not contain a definition for 'TryGetValue' and no extension method 'TryGetValue' accepting a first argument of type 'System.Web.Mvc.IValueProvider' could be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\xxx\My Documents\Visual Studio 2008\Projects\MyProject\Project\Helpers\DateAndTimeModelBinder.cs 83 42 Project
What am I missing something? I created a new class and put his code in a Helpers folder in my project.
IValueProvider does not contain a definition for TryGetValue
or something? May I change it? Will help others find your question for accuracy. – Horologist