1
I have a View(cshtml) and I need to call a partialView. This Partial is a table with the logs of that Sale, which will be viewed in tabular format at the bottom of the View. The problem is that when I try to open the View(Index) I get this error:
The model item passed into the Dictionary is of type 'System.Int32', but this Dictionary requires a model item of type 'System.Collections.Generic.Ienumerable`1[Subscriptioncenter.Core.Domain.Logs.Logalteracao]'.
How do I fix it?
This is my html where to "register" the Partial View
<div class="margin-40-b">
<p>@Html.Partial("_LogAlterarMarkup", Model.CustomerId)</p>
</div>
I’ve done it like this:
<p>@Html.Partial("_LogAlterarMarkup")</p>
and so
<p>@Html.Partial("_LogAlterarMarkup", Model.CustomerId)</p>
and also so
<p>@Html.Partial("_LogAlterarMarkup", Model.OrderId)</p>
OBS: A partial view is another Model(Log)
And how do I do that? This is not the View model, how do I take this model and step?
– pnet
@pnet how is the model expected in _Logalterarmarkup.cshtml? If possible post in the question.
– George Wurthmann