Here's a simple MVC View that displays all Areas in a DB and then lists all Carreras in each Area under the header.
<h2>Listado General de Carreras</h2>
<% foreach (var Area in (List<string>)ViewData["Areas"])
{ %>
<p><span class="titulo"><%: Area%></span></p>
<% foreach (var carrera in Model)
{
if (carrera.Area.Nombre == Area)
{ %>
<p><%=Html.ActionLink(carrera.Nombre, "Details", new { id = carrera.ID })%></p>
<% }
}
}%>
Do you think you can make this code a bit prettier/efficient?