I am getting the following error:
Cannot implicitly convert type IValueProvider to IDictionary
When I try to run the code below:
IDictionary<string, ValueProviderResult> valueProvider = formValues.ToValueProvider();
foreach (string k in formValues.Keys)
{
ModelState.SetModelValue(k, valueProvider[k]);
}
Can anyone help?
As I am using .NET 4.0 I had to do this:
I want to say thanks to @abatishchev for pointing out the differences.