title: How do I pass the right model to the Partial View?
body: <p>I'm getting this troublesome error in my view: </p>
  
  <blockquote>
    <p>The model item passed into the dictionary is of type 'ContactWeb.Models.ContactListViewModel', but this dictionary requires a model item of type 'ContactWebLibrary.Contact'.</p>
  </blockquote>
  
  <p>on this line of code: <code>@{Html.RenderPartial("Form");}</code></p>
  
  <p>I'm using <code>@model ContactWeb.Models.ContactListViewModel</code> at the top of this file.</p>
  
  <p>Here's my view:</p>
  
  <pre><code> @model ContactWeb.Models.ContactListViewModel
  
   &lt;h2&gt;Edit&lt;/h2&gt;
  
   @{Html.RenderPartial("Form");}
  
   @using (Html.BeginForm())
   {
      &lt;fieldset&gt;
      &lt;legend&gt;Select roles for this user:&lt;/legend&gt;
      &lt;ul&gt;
      @foreach(var role in Model.AllRoles)
      {
          &lt;li&gt;&lt;input name="Roles" type="checkbox" value="@role" /&gt;@role&lt;/li&gt;
      }
      &lt;/ul&gt;
      &lt;input type="submit" /&gt;
      &lt;/fieldset&gt;
  }
  </code></pre>