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?