I’m using MVC3 w/ Razor and I have a model that has quite a few properties that are sometimes empty.
Other than a custom htmlHelper, or using an if/then in the view for every LabelFor/DisplayFor pair, is there a way to not display the LabelFor/DisplayFor for a property that is empty or null?
I’m using MVC3 w/ Razor and I have a model that has quite a
Share
No…. You need the above mentioned solutions or additional view models. Sorry!