KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In my model I have an Entity public class Carrier { public Guid CarrierId { get; set; } public string Name { get; set; } } I also have a ViewModel public class CarrierIndexViewModel { public IEnumerable<Carrier> Carriers { get; set; } public PagingInfo PagingInfo { get; set; } } I have a strongly-typed (CarrierIndexViewModel) Index View, which is suppose to display a table of Carrier using PagingInfo. I'm trying to use Html helper to display Carrier.Name in my table's header When I used IEnumerable as a model for this view I had @Html.DisplayFor(model => model.Name) How can I get same result using my new CarrierIndexViewModel to display title for Carrier.Name?
Tags (comma-separated)
Save Edits
Cancel