# ASP.NET Core NumericTextBox Overview

The Telerik UI NumericTextBox TagHelper and HtmlHelper for ASP.NET Core are server-side wrappers for the Kendo UI NumericTextBox widget.

The NumericTextBox allows the user to select numeric values through direct input or by using spinner buttons.

* [Demo page for the NumericTextBox HtmlHelper](https://demos.telerik.com/aspnet-core/numerictextbox/index)

* [Demo page for the NumericTextBox TagHelper](https://demos.telerik.com/aspnet-core/numerictextbox/tag-helper)

## Initializing the NumericTextBox

The following example demonstrates the basic configuration for the NumericTextBox.

```Razor HtmlHelper
    @(Html.Kendo().NumericTextBox()
          .Name("numerictextbox") // The name of the NumericTextBox is mandatory. It specifies the "id" attribute of the widget.
          .Min(-100) // Set the min value of the NumericTextBox.
          .Max(100) // Set the min value of the NumericTextBox.
          .Value(10) // Set the value of the NumericTextBox.
    )
```

```Razor TagHelper
    <kendo-numerictextbox name="numerictextbox"
                      min="-100"
                      max="100"
                      value="10">
    </kendo-numerictextbox>
```

> Starting with the 2024 Q3 release, the HtmlHelper version of the component supports [declarative initialization](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/helper-basics/declarative-initialization).

## Basic Configuration

The NumericTextBox configuration options are passed as attributes.

```Razor HtmlHelper

        @(Html.Kendo().NumericTextBox<decimal>()
            .Name("currency")
            .Format("c")
            .Min(0)
            .Enable(true)
            .Max(100)
            .Value(30)
        )
```

```Razor TagHelper

        <kendo-numerictextbox name="currency" format="c" min="0"
            enable="true" max="100" value="30">
        </kendo-numerictextbox>
```

## Functionality and Features

| Feature                                                                                                                          | Description                                                                                                                                                                                                                                                             |
| -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Formats](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/formats)                      | The format property of the NumericTextBox allows you to convert a number object to a human-readable string by using the culture-specific settings.                                                                                                                      |
| [Labels](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/labels)                        | The `Label()` method enables you to associate the label HTML element with the NumericTextBox.                                                                                                                                                                           |
| [Globalization](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/globalization/overview) | The NumericTextBox comes with globalization support that allows you to use the component in apps all over the world.                                                                                                                                                    |
| [Accessibility](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/accessibility/overview) | The NumericTextBox is accessible for screen readers, supports WAI-ARIA attributes, and delivers [keyboard shortcuts](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/accessibility/keyboard-navigation) for faster navigation. |
| [Input Restrictions](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/precision)         | You can restrict the accepted value to a specific range and also control its precision.                                                                                                                                                                                 |
| [Events](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/events)                        | The NumericTextBox exposes the `Change()` and `Spin()` events that allow you to control its behavior.                                                                                                                                                                   |
| [Automatic Correction](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/auto-adjust)     | You can configure whether the component will autocorrect the user's input when the `Min` and `Max` values are set.                                                                                                                                                      |

> tip To learn more about the appearance, anatomy, and accessibility of the NumericTextBox, visit the [Progress Design System documentation](https://www.telerik.com/design-system/docs/components/numerictextbox/)—an information portal offering rich component usage guidelines, descriptions of the available style variables, and globalization support details.

## Next Steps

* [Getting Started with the NumericTextBox](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/getting-started)

* [Basic Usage of the NumericTextBox HtmlHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/numerictextbox/index)

* [Basic Usage of the NumericTextBox TagHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/numerictextbox/tag-helper)

* [NumericTextBox in Razor Pages](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/razor-page)

## See Also

* [Using the API of the NumericTextBox for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/numerictextbox/api)
* [Known Limitations of the NumericTextBox for ASP.NET Core](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/numerictextbox/limitations)
* [Knowledge Base Section](https://www.telerik.com/aspnet-core-ui/documentation/knowledge-base)
