Default Button

This example demonstrates the Bootstrap Button control with default settings. The Bootstrap Button control extends the standard button functionality by implementing an enhanced API, which you can use to manipulate the button's properties and respond to button events both in client-side and server-side code. In this demo, the client-side click event is handled to display a text message.

Use the following API to setup button appearance:

The following API allows you to manipulate the button on the client side:

    .ClientSideEvents(events => events
function onButtonClick(args) {
    dxbsDemo.showToast('The button has been clicked.');

Sending form data

Pass the true value to the UseSubmitBehavior method to specify that the button should submit form data. All editors whose data should be collected and sent to a controller action must be wrapped in the @using(Html.BeginForm()) { ... } construction.

You can specify the target submit route via the Route method.

@using(Html.BeginForm()) {


This example demonstrates how to create a Radio Group UI using button controls. Only one button in the group can be selected at a time.

The followin client API allows you to manipulate the checked state:

You can pass a unique value to the GroupName method to force the button to change its checked state on every click.

<div class="btn-toolbar">
    <div class="btn-group">
            .Text("Option 1")
            .Text("Option 2")
            .Text("Option 3")

Render Option

This example demonstrates buttons of various styles supported by the Bootstrap Framework.

<div class="btn-toolbar">
    <div class="btn-group">
        .SettingsBootstrap(settings => settings.RenderOption(BootstrapRenderOption.Link)))
        .SettingsBootstrap(settings => settings.RenderOption(BootstrapRenderOption.Danger)))
        .SettingsBootstrap(settings => settings.RenderOption(BootstrapRenderOption.Info)))
        .SettingsBootstrap(settings => settings.RenderOption(BootstrapRenderOption.Primary)))
        .SettingsBootstrap(settings => settings.RenderOption(BootstrapRenderOption.Success)))
        .SettingsBootstrap(settings => settings.RenderOption(BootstrapRenderOption.Warning)))


The Button can display supplementary information within a badge. A badge can display a text, an icon or both. Use the following API to set a badge:

The methods listed below allow you to manipulate the badge on the client:

    .Badge(badge => badge
        .IconCssClass("fa fa-thumbs-o-up"))
    .ClientSideEvents(events => events
    .SettingsBootstrap(bootstrap => bootstrap.RenderOption(BootstrapRenderOption.Info)))
function onLikeClick(args) {
    var likes = parseInt(this.getBadgeText());
    this.setBadgeText(!isNaN(likes) ? likes + 1 : 1);
Screen Size
Color Themes
Demo QR Code