I want to do something like this:
View
<td class="[email protected]">
@Model.Description
</td>
CSS
<style type="text/css">
.status_True
{
background-color: Red;
}
.status_False
{
background-color: Green;
}
</style>
@Model.IsActive is return True or False. Of course this code is not working.
Html output of class is : class="[email protected]"
My expected output is : class="status_True"
Is this possible to do something like this logic? If is possible, How can I do? Or another way to change css class? There may be different ways.
Thanks.