I'm not sure if this is possible in the view or if I would somehow have to check for it in the controller but I have some values that are null and I'm trying to fill up a table but I would like a placeholder such as N/A to show up if there's no values.
In my controller I'm just return the model data of a basic linq query.
var model = from u in db.Users where u.Username == "Bob" select u; In my view I'm just simply displaying the data in a table
<table class='table table-striped table-bordered table-responsive'> <tbody> <tr> <td>@Html.DisplayFor(model => model.CallNo)</td> </tr> </tbody> </table>