model
    //以页面为主的用户注册模式
    public class RegeditModel
    {
        public string ID { get; set; }        [Required(ErrorMessage = "请输入用户邮箱")]
        [Display(Name = "邮箱")]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }        [Required(ErrorMessage = "请输入密码")]
        [Display(Name = "密码")]
        [DataType(DataType.Password)]
        [StringLength(20, ErrorMessage = "{0}在{2}位至{1}位之间", MinimumLength = 6)]
        public string Pwd { get; set; }        [Display(Name = "重复密码")]
        [DataType(DataType.Password)]
        [Compare("Pwd", ErrorMessage = "密码与重复密码必须相同")]
        public string RePassword { get; set; }
    }
view
@model MvcB2CBookOnlineShopping.Models.RegeditModel@{
    ViewBag.Title = "testcreate";
    Layout = "~/Views/Shared/_Layout.cshtml";
}<h2>testcreate</h2>@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)    <fieldset>
        <legend>RegeditModel</legend>
        
        <div class="editor-label">
            @Html.HiddenFor(model => model.ID)
            @Html.LabelFor(model => model.Email) 
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>        <div class="editor-label">
            @Html.LabelFor(model => model.Pwd)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Pwd)
            @Html.ValidationMessageFor(model => model.Pwd)
        </div>        <div class="editor-label">
            @Html.LabelFor(model => model.RePassword)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RePassword)
            @Html.ValidationMessageFor(model => model.RePassword)
        </div>        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
卡在了 Controllers这里。
        [HttpPost]
        public ActionResult testcreate(RegeditModel Users)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    //WebSecurity.CreateUserAndAccount(Users.Email, Users.Pwd);
                    //WebSecurity.Login(Users.Email, Users.Pwd);
                    //return RedirectToAction("Index", "Home");
                    db.Users.Add(Users);
                    db.SaveChanges();
                    return RedirectToAction("Index");
                }
                catch (MembershipCreateUserException e)
                {
                    ModelState.AddModelError("", ErrorCodeToString(e.StatusCode));
                }            }
            return View(Users);
        }
提示说“  db.Users.Add(Users); ”这一行 “最匹配的重载方法具有一些无效参数”。求教啊唉mvc表单