Search results

Add link to a Button in ASP.NET Core Button control

19 Oct 2021 / 1 minute to read

The appearance of the Button can be changed like a hyperlink by e-link class using cssClass property and link navigation can be handled in Button click event.

In the following example, link is added in Button click event by using method.

Copied to clipboard
<ejs-button id="button" cssClass='e-link' content="Go to Google"></ejs-button>


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


    document.getElementById('button').onclick = function() {"");

Copied to clipboard
public ActionResult link()
    return View();