3

I scaffolded a table in MVC, and created a view. This is the Edit button, I want change it, and make it blue bootstrap button How would I conduct this?

Original Code:

        <td>
            <a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
        </td>

Incorporate this blue button:

<button type="button" class="btn btn-primary">Primary</button>
1
  • 2
    Just add class="btn btn-primary" to the <a> Commented May 9, 2018 at 23:29

1 Answer 1

6

You can just add the class name to your <a> element to style it as bootstrap button

<a class="btn btn-primary" asp-action="Edit" asp-route-id="@item.Id">Edit</a> 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.