title: Is ToValueProvider() changed in ASP.NET MVC2?
body: <p>I applied sample codes with the book Pro ASP.NET MVC Framework.</p>
  
  <pre><code>[AcceptVerbs(HttpVerbs.Post)]
      public ViewResult CheckOut(Cart cart, FormCollection form)
      {
          if (cart.Lines.Count == 0)
          {
              ModelState.AddModelError("Cart", "Sorry, your cart is empty");
              return View();
          }
  
          if (TryUpdateModel(cart.ShippingDetails, form.ToValueProvider()))
          {
              orderSubmitter.SubmitOrder(cart);
              cart.Clear();
              return View("Completed");
          }
          else
          {
              return View();
          }
      }
  </code></pre>
  
  <p>But when I tried to complete order form in the browser, it showed the following error message:</p>
  
  <p>Value cannot be null or empty.
  Parameter name: name 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>
  
  <p>Exception Details: System.ArgumentException: Value cannot be null or empty.
  Parameter name: name</p>
  
  <p>The sample codes in the book are based on ASP.NET MVC1 but I am running them on VS 2010 with ASP.NET MVC 2. And it seems to be some kind of changes in ToValueProvider() method.</p>
  
  <p>How can I fix this problem and make the mvc application run normally?Thanks very much.</p>