Ramco Ramco

Ramco Ramco

  • 435
  • 3.4k
  • 546.9k

Disable Delete Button

Jun 2 2021 3:15 AM
Hi
 
   I want if IsActive = "N" then Delete should be disabled
 
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
@Html.DisplayFor(modelItem => item.IsActive)
</td>
<td>
<a class='btn btn-primary btn-sm' id='btnEdit'><i class='fa fa-pencil'></i> Edit</a> <a class='btn btn-danger btn-sm' id='btnDelete' style='margin-left:5px'><i class='fa fa-trash'></i> Delete</a>
</td>
</tr>
}
 
Thanks 

Answers (2)