3
Answers

asp.net core Change span color if @Html.DisplayFor has no data

  1. <div class="col-2">  
  2.             <span class="form-control form-control-sm">@Html.DisplayFor(model => model.PTWContent.PTWNo)</span>  
  3.         </div>  
I want to have the textbox color yellow if there is no data retrieved from the database and to display "N/A". Is possible?
 
 
Answers (3)