title: MVC Change Row color based on value from model
body: <p>I have those 2 columns and I want to put the row where's the travel consultant = Username1 with green color on the letters and username2 with red color on the letters.
  How can I do this ?</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;table class="table table-striped table-hover table-bordered tablesModel"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
  
              &lt;th data-field="@Html.DisplayNameFor(model =&gt; model.Travel_Consultant)" data-sortable="true"&gt;
                  @Html.DisplayNameFor(model =&gt; model.Travel_Consultant)
              &lt;/th&gt;
  
              @*scope1, scope2*@
  
              &lt;th data-field="@Html.DisplayNameFor(model =&gt; model.Description)"&gt;
                  @Html.DisplayNameFor(model =&gt; model.Description)
              &lt;/th&gt;
  
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          @foreach (var item in Model)
          {
              &lt;tr&gt;
                  &lt;td data-field="@Html.DisplayNameFor(model =&gt; model.Travel_Consultant)" data-sortable="true"&gt;
                      @Html.DisplayFor(modelItem =&gt; item.Travel_Consultant)
                  &lt;/td&gt;
                  &lt;td data-field="@Html.DisplayNameFor(model =&gt; model.Description)"&gt;
                      @Html.DisplayFor(modelItem =&gt; item.Description)
                  &lt;/td&gt;
  
              &lt;td style="text-align:center;"&gt;
              &lt;button onclick="createOrEdit(@item.ExtraJobsID)" type="button" class="btn-xs buttongreenpt"&gt;
              &lt;i class="fa fa-edit fa-20px"&gt;&lt;/i&gt;
              &lt;/button&gt;
              &lt;/td&gt;
  
              &lt;/tr&gt;
          }
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>