I’ve written a function to output an enum as RadioButtons in a group (based on code answers found on here…blatantly stolen!)
However, the function takes a type argument – and I can’t work out how to call it from the View?
I’ve tried the two snippets below…the first works correctly, but doesn’t output anything, and I can’t work out how to get the second to take ?
@{
Html.RadioButtonForEnum<RuleType>("Rule");
}
@Html.RadioButtonForEnum<RuleType></RuleType> <--this gets autocompleted for me!
I’ve a feeling this is going to be simple…!
Sounds like you need to make your code block explicit. Try: