Range
<div class="form-group"> <label asp-for="Value" class="col-xs-12 control-label"></label> <div class="col-xs-12"> <input asp-for="Value" type="range" step="0.1" class="form-control" /> <span asp-validation-for="Value" class="text-danger"></span> </div> </div>
public class NumberExample { [DynamicRange(typeof(float), SMinimum = "1.0", SMaximum = "2.0")] public float Value { get; set; } }
return View(new NumberExample { Value = 1.5f });