how to remove IEnemurable in asp.net mvc
- by kumar
I have a view with
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<StudentInfo>>" %>
in my view if i have IEnumerable I can do foreach..
but before that i need to access the properties for StudnetInfo..
StudentInfo clas having
Public class StudentInfo
{
public Studentdetails sd {get;set;}
public classDetails cd {get;set;}
}
<% foreach(var e in Model){%>
<div>
<%=Html.DisplayFor(x=>e.StdentEdit) %>
<div>
<span>
<% Html.RenderAction("Details", "Home", new { @t = e }); %>
</span>
</div>
</div>
<% } %>
please can anybody help me out.. how to get the properties of StudentInfo above the foreach loop...
if i remove IEnemurable I can do that.. but i need to have Ienemurable for RenderAction..
is there any other way we can achieve this?
thanks