Here is the code in my view for users ratings display:
<div class="leftBlock">
<div class="leftBlockHead">
<div class="textHead">
<b>Users rating</b>
</div>
</div>
<div id="leftBlockContent">
@foreach (var user in Model)
{
<div class="list">
@user.Login @user.Rating
</div>
}
</div>
</div>
The problem is I use the same html structure for some other blocks. So I don't want to repeat this code, I need some kind of template which will take block title and @foreach as arguments. What are the ways to implement it?