Can I do something like this?
- by kumar
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<StudentInfo>>" %>
<% int i = 0; %>
<% foreach(var e in Model){%>
<div>
<% if(i==0) { %>
<% Html.RenderAction("student", "home", new { @et = e}); %>
<% break;
} %>
<div>
<span>
<% Html.RenderAction("studentDetails", "home", new { @et = e }); %>
</span>
</div>
</div>
<%i++; } %>
here my intension was to execute Renderction Student only once.. and Studentdetails should be multiple times..
but int value is allways taking i =0 bec each time page is loading its considering 0 allways..
can anybody tell me how to do this?
thanks