This section briefly explains about how to include a simple Button in your ASP.NET MVC application. You can refer ASP.NET MVC Getting Started documentation page for introduction part of the system requirements and configure the common specifications.
We are going to render Button
component in Index.cshtml page.
@Html.EJS().Button("element").Content("Button").Render()
public ActionResult Index()
{
return View();
}
Output be like the below.
After successful compilation of your application, simply press F5
to run the application.
The following example shows a default rendering of Button.
@Html.EJS().Button("element").Content("Button").Render()
public ActionResult Index()
{
return View();
}
To change the default Button to flat Button, set the cssClass
property to e-flat
.
@Html.EJS().Button("element").Content("Button").CssClass("e-flat").Render()
public ActionResult FlatButton()
{
return View();
}