Horje
how to fill model enum with bradio button asp razor Code Example
how to fill model enum with bradio button asp razor
@{var numList = Enum.GetValues(typeof(Models.numbers));}
@foreach (object radiotext in numList)
{
    @Html.RadioButton("radioname", radiotext.ToString())@radiotext.ToString()
}
how to fill model enum with bradio button asp razor
namespace Models
{
    public enum numbers
    {
        one = 1,
        two = 2,
        three = 3
    }
}
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())
}




Csharp

Related
c# double without exponential notation Code Example c# double without exponential notation Code Example
How to add rigidbody as a variable Code Example How to add rigidbody as a variable Code Example
sequelize top Code Example sequelize top Code Example
oracle query parameters c# Code Example oracle query parameters c# Code Example
unity sprite disappears when using transform.lookat Code Example unity sprite disappears when using transform.lookat Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9