|
this is more of a general MVC question, but I prefer the help from this community over all others because you guys rock!
I'm passing in an IEnumerable<model> into my View and I defined at the top of my View
@model IEnumerable<Namespace.Models.ModelName>
later on in my View, I have a table where I define header rows and then a foreach loop for the data rows that enumerates over the model I passed in.
My question is, can I use @Html.DisplayTextFor() in the table header rows to display the name that I've defined in the model?
I can't seem to figure out the syntax or how to do it with an IEnumerable. If I were passing in a single instance of the model, it works fine, but I can't seem to figure it out with the IEnumerable.
Thanks for any assistance.
|