InputNumber
InputNumber
Editor Template
This sample shows the usages of the editor templates offered by C1.
Features
Description
This sample shows the usages of the editor templates offered by C1.
You can use these templates out of the box with C1 MVC project template.
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 EditorTemplates() { var model = new Sale { ID = 101, Start = new DateTime(2014, 4, 4, 17, 0, 0), End = DateTime.Now, Amount = 1000 }; return View(model); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 | @model Sale < div > < label > @Html .Raw(InputNumberRes.EditorTemplates_Text2)</ label > @Html .EditorFor(m => m.Amount) @Html .EditorFor(m => m.Start, "Time" ) @Html .EditorFor(m => m.End) </ div > @section Description{ < p > @Html .Raw(InputNumberRes.EditorTemplates_Text0)</ p > < p > @Html .Raw(InputNumberRes.EditorTemplates_Text1)</ p > } |