KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a list of items which I want to output in a razor view. Between each item I want to add a separator line, like this: item1 | item2 | item3 The simplest way to loop through items is with a foreach: @foreach(var item in Model.items){ <span>@item.Name</span> | } Unfortunately this adds an extra separator line at the end of the list. Is there a simple way to skip this last separator line?
Tags (comma-separated)
Save Edits
Cancel