Hi,
I am have been working on an ASP.NET Application. When passing data from the Controller to the View I have been doing the following-
<%foreach(myModel classified in(IQueryable<MyModel>)ViewData["Classifieds"])
{%>
<p><span class="Bold">Title:</span> <%: classified.Header %></p>
<p><span class="Bold">Price: £ </span><%: classified.Price %></p>
<%}%>
As you might guess this is my main content. A load of adverts. Now I want the category that the classified are in as the header of my page. What other way is there istead of going foreach... so it only appears once.
Thanks,