我的联系表格有问题.它说:编译器错误消息:CS1963:表达式树可能不包含动态操作.我试图使用@using ...语句没有运气.我也使用@models的大写和小写"m",没有运气.请详细解释解决方案.我正在使用Visual Studio 2012,如果有帮助的话.
这是代码; HTML:
@Model img_site.Models.customer;
@{
ViewBag.Title = "Contact";
<link href="~/Content/css/cnt-us_css.css" rel="stylesheet" type="text/css" />
ViewBag.update = "May14, 2014"; } ... @using (Html.BeginForm("Submit", "HomeCotroller", FormMethod.Post , new { @name = "cnt_us-frm" })) {
@Html.ValidationSummary(true)
<fieldset>
<legend></legend>
<table>
<tr>
<td>
<label for="Fname"> First name <span class="important"> * </span> </label>
</td>
<td>
@Html.EditorFor(m => Model.Fname, new { @tabindex="0"})
@Html.ValidationMessageFor(m => Model.Fname)
</td>
</tr>
<tr>
<td>
<label for="Lname"> Last name </label>
</td>
<td>
@Html.EditorFor(m => Model.Lname, new { @tabindex="1"})
@Html.ValidationMessageFor(m => …Run Code Online (Sandbox Code Playgroud)