For each in view


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <%@ Import Namespace="projectname.Models" %>
  2.  
  3. <%foreach (databasetable record in (IEnumerable)ViewData.Model)
  4. {%>
  5. <%=record.id %>
  6. <%}%>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.