Change row color depend on condition in razor syntax
Hi.I have one page where I written below code.
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.NotificationType)
</td>
<td>
@Html.DisplayFor(modelItem => item.NextActionTaker)
</td>
</tr>
}
Here, I want to change row color by adding condition while creating <tr>.
I have written if else statement which was not working properly.
Please suggest.