title: Upgrading to ASP.NET MVC 2 - formCollection.ToValueProvider()
body: <p>I am getting the following error:</p>
  
  <blockquote>
    <p>Cannot implicitly convert type IValueProvider to IDictionary</p>
  </blockquote>
  
  <p>When I try to run the code below:</p>
  
  <pre><code>IDictionary&lt;string, ValueProviderResult&gt; valueProvider = formValues.ToValueProvider();
  foreach (string k in formValues.Keys)
  {
      ModelState.SetModelValue(k, valueProvider[k]);
  }
  </code></pre>
  
  <p>Can anyone help?</p>