The quick start guides you through the steps of adding an InputNumber control to your application. For information on how to add ASP.NET MVC Edition controls, see Adding Controls.
Follow the steps given below to get started:
Create a new MVC application using the ComponentOne or VisualStudio templates. For more information about creating an MVC application, see Configuring your MVC Application topic.
Add a new Controller:
Default1Controller
).Add a View for the controller:
Default1Controller
) to open it.Index()
.Index.cshtml
to open it.Index.cshtml
file with the code given below to initialize a InputNumber control.
HTML |
Copy Code
|
---|---|
<div> <p> Enter an integer between zero and ten:</p> <c1-input-number value=0 format="n0" min="0" max="10" placeholder="Integer between zero and ten" ></c1-input-number> </div> <div> <p> Edit the integer using spinner buttons:</p> <c1-input-number value=0 format="n0" min="0" max="10" placeholder="Integer between zero and ten" step="1"></c1-input-number> </div> <div> <p>Edit currency value:</p> <c1-input-number value=100 format="c" step=100 min=100 max=1000 placeholder="amount below $1,000"></c1-input-number> </div> <div> <p>Edit percentages:</p> <c1-input-number placeholder="percentage" format="p0" step="0.1"></c1-input-number> </div> |