I have an mvc view that uses "tabs", each of these tabs displays a different form of the same data (available from my viewmodel). The data is displayed as follows:
<div id=tab1>
@foreach (Path p in Model.Paths.Where(r => r.PathType == "HR"))
{
(displays html and data)
}
</div>
<div id=tab2>
@foreach (Path p in Model.Paths.Where(r => r.PathType == "IT"))
{
(displays html and data)
}
</div>
and so on...since each iteration uses the same html and named variable (p), what is the best way of not repeating these values?