目前我正在创建在线表单,所以我在验证单选按钮字段时遇到了问题。我设法为我的所有文本框创建验证消息,但似乎为单选按钮创建验证消息与为文本框创建验证方式不同? 我的问题是 我有性别单选按钮,“男”和“女”,我应该如何验证这些领域? 我的视图模型 public class PersonalValidator
{
public int personalInfoId { get; set; }
我正在尝试将RadioButtonFor传递给模型。 控制器 [HttpPost]
public ActionResult Contact(ApplicationCommentType model)
{
//send email here
//reload form
ApplicationCommentType appdata = new