I have a model with a 'PartActionType' enum which includes Transfer, Harvest, and Dispose options.
public enum PartActionType
{
Transfer,
Harvest,
Dispose
}
On my view page, I am displaying these options using radio buttons like this:
@foreach (var actionType in partActionTypes)
{
<td>
@Html.RadioButtonFor(x => x.Components[i].SelectedActionType, actionType)
</td>
}
I would like to set the default option to 'Transfer'. How can I achieve this?
After following David's suggestion, this is how it looks now: