[]
This quick start guides you through the steps of adding the NumericBox control in your Blazor application and specifying the type of numeric data that can be added to the control.
type=note
Note: Blazor Server App or server-side app can be created using the Blazor Server App template. For more details, see Blazor Server topic under Blazor Project Types.
In the Solution Explorer, right click Dependencies and select Manage NuGet Packages.
In NuGet Package Manager, select nuget.org as the Package source.
Search for C1.Blazor.Input package and click Install.
Navigate to the wwwroot, open index.html file.
Register the client resources by adding the following lines of code to the <head> tag.
<link rel="stylesheet" href="/_content/C1.Blazor.Core/styles.css" />
<link rel="stylesheet" href="/_content/C1.Blazor.Input/styles.css" />
Add the following code to the <body> tag.
<script src="/_content/C1.Blazor.Core/scripts.js"></script>
<script src="/_content/C1.Blazor.Input/scripts.js"></script>
Right click on Pages folder, click Add | Razor Component to add a new Razor page and then provide a name, say NumericBoxQuickStart.
Add the required directives to initialize and use the NumericBox control in the new Razor page.
@using C1.Blazor.Input
Add the NumericBox control to application and specify the type of numeric data it can accept using TNumeric property using the following code.
@page "/NumericBox/Index"
@using C1.Blazor.Core
@using C1.Blazor.Input
<C1NumericBox TNumeric="double?"></C1NumericBox>