System.Web.Mvc.AjaxHelper 不包含“BeginForm”的定义我在我的 mvc3 项目中遇到此错误请帮我解决这个问题
这是我的代码:
@{
ViewBag.Title = "Register";
Layout = "~/Views/Shared/_MyLayout.cshtml";
}
@model FoodMart.Models.AccountModel
@using (Ajax.BeginForm("Register", new AjaxOptions { UpdateTargetId = "result" }))
{
<div id="result" style="width:800px">
<fieldset style="width:100%">
<legend><span style="font-size:larger; color:Green; font-family:Arial">Register Here</span></legend>
<table style="width:100%">
<tr>
<td>@Html.LabelFor(m => m.users.FirstName,"Enter First Name")</td>
<td>@Html.TextBoxFor(m => m.users.FirstName, new { style = "width:150px" })</td>
<td><span style="font-size:medium; color:Green;">@Html.ValidationMessageFor(m=>m.users.FirstName)</span></td>
</tr>
<tr>
<td>@Html.LabelFor(m => m.users.Landline)</td>
<td>@Html.TextBoxFor(m => m.users.Landline, new { style = "width:150px" })</td>
</tr>
<tr>
<td><input type="submit" value="Register" /></td>
<td></td>
</tr>
</table>
</fieldset>
</div>
}