Radio Button Tag Helpers in ASP.NET 5 MVC 6
问题 I don't see any tag helpers for radio buttons in ASP.NET 5 MVC 6. What's the right way of handling form elements where I need to use radio buttons? 回答1: There is a TagHelper for all the input types which includes the radio button type as well. Assuming you have a view model like this public class CreateUserVm { public string UserName { set; get; } public IEnumerable<RoleVm> Roles { set; get; } public int SelectedRole { set; get; } } public class RoleVm { public int Id { set; get; } public