Getting Started with ASP.NET MVC Badge Control

7 Nov 20231 minute to read

This section briefly explains about how to include ASP.NET MVC Badge control in your ASP.NET MVC application using Visual Studio.


System requirements for ASP.NET MVC controls

Create ASP.NET web application with HTML helper

Add stylesheet

Here, the theme is referred using CDN inside the <head> of ~/Views/Shared/_Layout.cshtml file as follows,

    <!-- Syncfusion ASP.NET MVC controls styles -->
    <link rel="stylesheet" href="" />


Checkout the Themes topic to learn different ways (CDN, NPM package, and CRG) to refer styles in ASP.NET MVC application, and to have the expected appearance for Syncfusion ASP.NET MVC controls.

Add ASP.NET MVC Badge control

Now, add the Syncfusion ASP.NET MVC Badge control in ~/Home/Index.cshtml page.

<div id='element'>
    <h1>Badge Component <span class="e-badge e-badge-primary">New</span></h1>
#element {
    display: flex;
    width: 400px;
    margin: auto;
    border: 1px solid #dddddd;
    border-radius: 3px;
    justify-content: center;

Press Ctrl+F5 (Windows) or +F5 (macOS) to run the app. Then, the Syncfusion ASP.NET MVC Badge control will be rendered in the default web browser.

ASP.NET MVC Badge Control


View Sample in GitHub.

See also

Types of Badge