Here is what I have been toying with.
I have a class like this;
public partial class DespatchRoster : DespatchRosterCompare, IGuidedNav
{
public string despatchDay { get; set; }
}
I've added meta data to it.
[MetadataType(typeof(RosterMetadata))]
public partial class DespatchRoster
{
}
public class RosterMetadata
{
[Display(Name="Slappy")]
public string despatchDay { get; set; }
}
In my HTML I have the following;
<% PropertyInfo[] currentFields = typeof(DespatchRoster).GetProperties(); %>
<% foreach (PropertyInfo propertyInfo in currentFields){ %>
<li class="<%= propertyInfo.Name %>"><%= propertyInfo.Name %></li>
<%} %>
What I want to see is Slappy as an LI instead of despatchDay.
I know i've done this before but can't think how.