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

C#
0

Html.RadioButtonFor() in Razor View

@model Student

@Html.RadioButtonFor(m => m.Gender,"Male")
@Html.RadioButtonFor(m => m.Gender,"Female")


//upon compilations
<input checked="checked" 
        id="Gender" 
        name="Gender" 
        type="radio" 
        value="Male" />

<input id="Gender" 
        name="Gender" 
        type="radio" 
        value="Female" />
Posted by: Guest on September-28-2021

C# Answers by Framework

Browse Popular Code Answers by Language