The ASP.NET MVC Button is a custom HTML5 button control. It has several built-in features such as support for icons, predefined styles, different button types, different button sizes, and UI customization. Toggle and repeat button functionality can be achieved by handling a click event.
Users tend to perceive visual information more readily than text. To this end, an icon button has been designed to include an icon to the right or left of the button text or provide an icon-only button.
The ASP.NET MVC Button control can be used to visually represent a hyperlink with both an icon and text.
The button can be styled with a border and a transparent background.
Several predefined styles of button are available:
You can use them based on the context of your application.
The ASP.NET MVC button can be used as a toggle button to trigger two different actions based on its two states: pressed and released.
You can extend this button to act as a repeat button, which performs the click event repeatedly when it is clicked and held.
The ASP.NET MVC disabled button is used to indicate the inactive state of a button. It can be enabled or disabled by using the disabled property.
You can choose from different button sizes, default and small, as required in your application.
You can choose from built-in button types such as outline, block, and round buttons. Also, you can customize the button’s appearance.
The ASP.NET MVC Button control supports built-in themes such as Bootstrap 5, Tailwind CSS, Fluent, high contrast, and more. Users can customize these built-in themes or create new themes to achieve the desired look and feel either by simply overriding SASS variables or using the Theme Studio application.
The Button component is also available in Blazor, React, Angular, JavaScript and Vue frameworks. Check out the different Button platforms from the links below,
Easily get started with the ASP.NET MVC Button using a few simple lines of C# code example as demonstrated below. Also explore our ASP.NET MVC Button Example that shows you how to render and configure a Button in ASP.NET MVC.
@using Syncfusion.EJ2
@section ControlsSection{
<div id='button-control'>
<div className="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("primarybtn").Content("Primary").IsPrimary(true).Render()
</div>
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("normalbtn").Content("Normal").Render()
</div>
</div>
</div>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace EJ2MVCSampleBrowser.Controllers.Button
{
public partial class ButtonController : Controller
{
public ActionResult DefaultFunctionalities()
{
return View();
}
}
}
#button-control .col-xs-12 {
margin: 15px 0;
}
#button-control {
text-align: center;
}
Syncfusion ASP.NET MVC Button provides the following features:
You can find our ASP.NET MVC Button demo here.
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers.
A good place to start would be our comprehensive getting started documentation.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.