Answers for "Html.CheckBoxFor() in Razor View"

C#
0

Html.CheckBoxFor() in Razor View

@model Student

@Html.CheckBoxFor(m => m.isActive)

//upon compilations
<input data-val="true" 
        data-val-required="The isActive field is required." 
        id="isActive" 
        name="isActive" 
        type="checkbox" 
        value="true" />

<input name="isActive" type="hidden" value="false" />
Posted by: Guest on September-28-2021

C# Answers by Framework

Browse Popular Code Answers by Language