I have a boolean property IsActive. In the view is a list of objects with their properties (including IsActive). But in the list the IsActive is a non-editable checkbox since it's boolean. If I change DisplayFor() to DisplayTextFor() then it will just display True or false instead of checkbox. How can I change True and false to 'Active' and 'Inactive' where Active is true and Inactive is false?
@Html.DisplayTextFor(modelItem => item.IsActive)
And then I would style the 'Active' to green and 'Inactive' to red