Trying to use a view model that includes a complex property that I would like to edit and persist on post back
public class MyViewModel
{
public string SearchTerm1 {get;set;}
public string SearchTerm2 {get;set:}
public NavStuff NavStuff {get;set:}
public virtual ICollection<Stuff> StuffIWant{ get; set; }
}
public class NavStuff
{
public bool Next {get;set;}
public bool Back {get;set;}
.....
}
I'd like to use it this way so I can send the NavStuff to a partial view
@Html.Partial("NavStuffPartial", Model.NavStuff)
This works fine on the initial Get but when I post the model back I lose the data in NavStuff. Is there a way to do this or am I just going in the wrong direction? Thanks