我正在通过 Steven Sanderson 的 Pro ASP.NET MVC 3 工作(是的,我知道它已经过时了)。第一个示例 PartyInvites 是一个简单的 MVC 应用程序,它会询问姓名、电子邮件并会参加。我在 VS 2010 中输入了代码,据我所知,一切都是正确的。不过,我没有提交按钮。我已经尝试过 Firefox 和 Explorer。
我知道这不是很多信息,但是有什么可以直接告诉那些知道的吗?
谢谢!
编辑
我的视图标记
<body>
@using (Html.BeginForm()) {
<p>Your name: @Html.TextBoxFor(x => x.Name)</p>
<p>Your email: @Html.TextBoxFor(x => x.Email)</p>
<p>Your phone: @Html.TextBoxFor(x => x.Phone)</p>
<p>Will you attend? @Html.DropDownListFor(x => x.WillAttend, new[]{ new SelectListItem() {Text = "Yes, I'll be there", Value = bool.TrueString}, new SelectListItem() {Text = "No, I can't come", Value = bool.FalseString} },"Coose an option" ) </p>
}
</body>