Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an ASP MVC equivilent to JSTL tags?

Are there any libraries that support JSTL style coding in an ASP MVC view?

I much prefer

<c:forEach var="c" items="${Customers}">
  <c:out value="${c.Name}"/><br/ >
</c:forEach>

to

<% foreach(Customer c in customers) { %>
  <%= c.Name %><br/ >
<% } %>
like image 378
Ryan Michela Avatar asked Oct 15 '22 16:10

Ryan Michela


1 Answers

Yep, Spark is probably your friend on that one. Looks pretty similar in spirit.

<c:forEach var="c" items="${Customers}">
  <c:out value="${c.Name}"/><br/ >
</c:forEach>

becomes

<for each="var c in Customers">
  ${c.Name}<br/>
</for>
like image 68
loudej Avatar answered Oct 20 '22 18:10

loudej