Search results

Tooltip for Button in ASP.NET MVC Button control

15 Oct 2021 / 1 minute to read

Tooltip can be shown on Button hover and it can be achieved by setting title attribute.

The following snippets illustrates how to show tooltip on Button hover.

razor
tooltip.cs
Copied to clipboard
@Html.EJS().Button("primarybtn").Title("Primary Button").Content("Button").IsPrimary(true).Render()

<style>

button {
  margin: 25px 5px 20px 20px;
}

</style>
Copied to clipboard
public ActionResult tooltip()
{
    return View();
}