Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to give value to model from radio button html asp with enums if checked

@model Enum
@foreach (var value in Enum.GetValues(Model.GetType()))
{
    @Html.RadioButtonFor(m => m, value)
    @Html.Label(value.ToString())
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #give #model #radio #button #html #asp #enums #checked
ADD COMMENT
Topic
Name
4+9 =