title: mvc4 + Compiler Error Message: CS1963: An expression tree may not contain a dynamic operation
body: <p>I'm having trouble with my contact form.  It says:  Compiler Error Message: CS1963: An expression tree may not contain a dynamic operation.  I tried to use the @using ... statement without luck.  I also used the @models with both capital and lower case "m" and no luck.  Please explain with great detail the solution(s).  I'm using Visual Studio 2012, if it helps.</p>
  
  <p>Here is the code;
  html:</p>
  
  <pre><code>@Model img_site.Models.customer;
  
  @{
      ViewBag.Title = "Contact";
      &lt;link href="~/Content/css/cnt-us_css.css" rel="stylesheet" type="text/css" /&gt;
      ViewBag.update = "May14, 2014"; } ... @using (Html.BeginForm("Submit", "HomeCotroller", FormMethod.Post , new { @name = "cnt_us-frm" })) {
      @Html.ValidationSummary(true)
      &lt;fieldset&gt;
          &lt;legend&gt;&lt;/legend&gt;
          &lt;table&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;label for="Fname"&gt; First name  &lt;span class="important"&gt; * &lt;/span&gt; &lt;/label&gt; 
                  &lt;/td&gt;
                  &lt;td&gt;
                      @Html.EditorFor(m =&gt; Model.Fname, new { @tabindex="0"})
                      @Html.ValidationMessageFor(m =&gt; Model.Fname)
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                     &lt;label for="Lname"&gt; Last name &lt;/label&gt; 
                  &lt;/td&gt;
                  &lt;td&gt;
                      @Html.EditorFor(m =&gt; Model.Lname, new { @tabindex="1"})
                      @Html.ValidationMessageFor(m =&gt; Model.Lname)
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;label for="te;_area"&gt; Telephone &lt;span class="important"&gt; * &lt;/span&gt; &lt;/label&gt; 
                  &lt;/td&gt;
                  &lt;td&gt;(@Html.TextBoxFor(m =&gt; Model.tel_area, new {@size="1", @maxlength="3", @tabindex="2"}))
                      @Html.ValidationMessageFor(m =&gt; Model.tel_area)
                      @Html.TextBoxFor(m =&gt; Model.fir_thr_tel, new {@size="1", @maxlength="3", @tabindex="3"}) -
                      @Html.ValidationMessageFor(m =&gt; Model.fir_thr_tel)
                      @Html.TextBoxFor(m =&gt; Model.lst_fur_tel, new {@size="2", @maxlength="4", @tabindex="4"})
                      @Html.ValidationMessageFor(m =&gt; Model.lst_fur_tel)
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;label for="Email"&gt; Email &lt;span class="important"&gt; * &lt;/span&gt; &lt;/label&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      @Html.TextBoxFor(m =&gt; Model.Email , new { @tabindex="5"})
                      @Html.ValidationMessageFor(m =&gt; Model.Email)
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;]
                  &lt;td&gt;
                      &lt;label for="Reasn"&gt; Reason &lt;span class="important"&gt; * &lt;/span&gt; &lt;/label&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      @Html.TextAreaFor(m =&gt; Model.Reasn, new { @tabindex="6"})
                      @Html.ValidationMessageFor(m =&gt; Model.Reasn)
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr id="buttons"&gt;
                  &lt;td&gt;
                      &lt;input type="reset" id="resbnt" value="Reset" tabindex="7" /&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="submit" id="subnt" value="Submit" tabindex="8" /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/fieldset&gt; }
  </code></pre>
  
  <p>model:</p>
  
  <pre><code>namespace img_site.Models
  {
      public class customer
      {
          ...
          [Required(ErrorMessage = "first name is required!")]
          public string Fname { get; set; }
  
          public string Lname { get; set; }
  
          [Required(ErrorMessage = "area code is required!")]
          [StringLength(3)]
          [RegularExpression(@"^[0-9]{3,}$", ErrorMessage = "Minimum 3 numbers required &amp; contain only numbers")]
          public string tel_area { get; set; }
  
          [Required(ErrorMessage = "first three numbers are required!")]
          [StringLength(3)]
          [RegularExpression(@"^[0-9]{3,}$", ErrorMessage = "Minimum 3 numbers required &amp; contain only numbers")]
          public string fir_thr_tel { get; set; }
  
          [Required(ErrorMessage = "last four numbers are required!")]
          [StringLength(4)]
          [RegularExpression(@"^[0-9]{4,}$", ErrorMessage = "Minimum 4 numbers required &amp; contain only numbers")]
          public string lst_fur_tel { get; set; }
  
          [Required(ErrorMessage = "E-mail is required!")]
          [RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "E-mail is not valid")]
          public string Email { get; set; }
          [Required(ErrorMessage = "A reason is required!")]
          public string Reasn { get; set; }
  
          public string Tele { get; set; }
  
          public void Tele_comp()
          {
              Tele = "(" + tel_area + ")" + fir_thr_tel + "-" + lst_fur_tel;
          }
  
      }
  }
  </code></pre>