Search results

Getting Started

This section briefly explains about how to create a simple Button in your ASP.NET Core application. You can refer ASP.NET Core Getting Started documentation page for introduction part of the system requirements and configure the common specifications.

Add Button to the project

To create simple Button add the ejs-button tag with id attribute as element in your Index.cshtml page.

tagHelper
default.cs
<ejs-button id="element" content="Button"></ejs-button>
public IActionResult Index()
    {
            return View();
    }

Output be like the below.

Button Sample

Run the application

After successful compilation of your application, simply press F5 to run the application.

The following example shows a default rendering of Button.

tagHelper
default.cs
<ejs-button id="element" content="Button"></ejs-button>
public IActionResult Index()
    {
            return View();
    }

Change Button type

To change the default Button to flat Button, set the cssClass property to e-flat.

tagHelper
flatbutton.cs
<ejs-button id="element" cssClass="e-flat" content="Button"></ejs-button>
public IActionResult FlatButton()
    {
            return View();
    }

See Also