Probably a stupid question, but here goes. In my view, I have the following code....
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Learner.MvcApplication.ViewModels.PagerViewModel>" %><%
for (int i = Model.StartPage; i <= Model.EndPage; i++)
{
%>
<% =Html.Label(ViewData.Model.Controller + i.ToString()) %>
<%
} %>
Do I have to close and reopen around the call to Html.Label "%><%" etc.?
I'd much rather do something like...
for (int i = Model.StartPage; i <= Model.EndPage; i++)
{
Html.Label(ViewData.Model.Controller + i.ToString());
}
...but the labels aren't being displayed.
Can you guess that I'm new to this??
Many thanks,
ETFairfax.