To add to the answer SLaks.
You can encapsulate your html in partial view.
Call <%= Html.Partial("ViewName", optional_ViewModel) %> .
This may be closer to repeater control. Where PartialView will look like your element template.
This approach also allows for very good reuse of code.
source share