renderpartial with null model gets passed the wrong type

Andrew I think the problem you are getting is a result of the RenderPartial method using the calling (view)’s model to the partial view when the model you pass is null.. you can get around this odd behavior by doing:

<% Html.RenderPartial("TaskList", Model.Tasks, new ViewDataDictionary()); %>

Does that help?

Leave a Comment