I'm looping through a list in my Model and sending the data to an Html.Partial.
I'd like to know if I can pass an additional string value that isn't in the indexed model. I want to use this partial in two separate spots on the same page but I need to differentiate the data target for some Javascript.
For example, the loop in my View currently looks like this:
@for (var i = 0; i < Model.Team.Count(); i++)
{
@Html.Partial("EmployeeTableRow", Model.Team[i])
}
and the EmployeeTableRow partial:
<tr data-target="[additional string variable]">
<td>@Model.Fname</td>
<td>@Model.Lname</td>
</tr>
The actual Model data contains a great deal more info that I'd rather not have to specifically define using new {} if possible.
Any help or links to duplicate questions would be appreciated!