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