的定義System.Web.Mvc.AjaxHelper不包含'BeginForm的定義我在我的mvc3項目中出現此錯誤,請幫我解決此問題System.Web.Mvc.AjaxHelper不包含'BeginForm
這裏是我的代碼:
@{
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>
}
這很可能會在你的web.config一個錯誤,但它不可能告訴沒有任何代碼或標記任何 –