ASP.NET MVC a binded list of RadioButtons where only one RadioButton can be checked
I have a list of EmailAddress object and each e-mail adress has an int ID, a string Email, and a bool Prefered.
I want to render the email adress in a textbox followed by a radio button for the option of prefered. The user should be shown all email addresses and only one prefered radi开发者_开发问答o button should be checked.
The trouble I have is because I am using a list of bools and binding to a list, the name attribute on each html Input tag will be different in order that the list of texboxes and radio buttons can be bound to the IList
Is this acheiveable? If so, how? I can't seem to find anything out there.
精彩评论