InputNumber
InputNumber
Model Binding
This sample shows how to use model binding features with input controls.
Features
Description
This sample shows how to use model binding features with input controls.
Use for attribute in C1 input control tag.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | using System; using Microsoft.AspNetCore.Mvc; using MvcExplorer.Models; namespace MvcExplorer.Controllers { public partial class InputNumberController : Controller { public ActionResult ModelBinding() { var model = new CustomerOrder { ID = 101, Country = "China" , Count = 5, OrderTime = DateTime.Now, Product = "PlayStation 4" }; return View(model); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 | @model CustomerOrder < div > < label > @Html .Raw(InputNumberRes.ModelBinding_Text3)</ label > < c1-input-number for = "@Model.Count" ></ c1-input-number > < c1-input-time for = "@Model.OrderTime" ></ c1-input-time > </ div > @section Description{ < p > @Html .Raw(InputNumberRes.ModelBinding_Text0)</ p > < p > @Html .Raw(InputNumberRes.ModelBinding_Text1)</ p > } |