Search results

Create a Block Button

You can customize a Button into a Block Button that will span the entire width of its parent element. To create a Block Button, set the cssClass property to e-block.

razor
blockbutton.cs
@Html.EJS().Button("blockbtn").Content("BLOCKBUTTON").CssClass("e-block").Render()
@Html.EJS().Button("primarybtn").Content("BLOCKBUTTON").CssClass("e-block").IsPrimary(true).Render()
@Html.EJS().Button("successbtn").Content("BLOCKBUTTON").CssClass("e-block e-success").Render()

<style>

button {
  margin: 25px 0;
}

</style>
public ActionResult blockButton()
{
    return View();
}