how to remove IEnemurable in asp.net mvc
Posted
by kumar
on Stack Overflow
See other posts from Stack Overflow
or by kumar
Published on 2010-05-20T15:52:30Z
Indexed on
2010/05/20
16:10 UTC
Read the original article
Hit count: 168
ASP.NET
|asp.net-mvc
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
© Stack Overflow or respective owner