title: CaptchaMvc using Ajax.beginform asp.net mvc4
body: <p>Im using CaptchaMvc.Mvc4 1.5.0 in my asp.net mvc4 application.
  this is my view:</p>
  
  <pre><code>@using CaptchaMvc.HtmlHelpers;
  @using CaptchaMvc;
  @model Web.Models.Message
  @using (Ajax.BeginForm("Contact", "Home", new AjaxOptions
  {
      HttpMethod = "post",
      InsertionMode = InsertionMode.Replace,
      UpdateTargetId = "Sent"
  }
  {
              @Html.AntiForgeryToken()
              @Html.ValidationSummary(true)
              &lt;fieldset&gt;                       
              @Html.LabelFor(model =&gt; model.Name)
              &lt;div&gt;
              @Html.TextBoxFor(model =&gt; model.Name)
              @Html.ValidationMessageFor(model =&gt; model.Name)
              &lt;/div&gt;  
              @Html.LabelFor(model =&gt; model.Email)
              &lt;div&gt;
              @Html.TextBoxFor(model =&gt; model.Email)
              @Html.ValidationMessageFor(model =&gt; model.Email)
              &lt;/div&gt;                              
              @Html.LabelFor(model =&gt; model.Message1)
              &lt;div&gt;
              @Html.TextBoxFor(model =&gt; model.Message1)
              @Html.ValidationMessageFor(model =&gt; model.Message1)
              &lt;/div&gt;
  
              @Html.MathCaptcha()
  
              &lt;input type="submit" value="Create" /&gt;
              &lt;/fieldset&gt;
  
              &lt;div id="Sent"&gt;
              &lt;/div&gt;
    }
  </code></pre>
  
  <p>and this is my Action Method :</p>
  
  <pre><code>[HttpPost]
  public ActionResult Contact(Message message)
  {
     if(this.IsCaptchaValid("error"))           
     if (ModelState.IsValid )
     {
         db.Messages.Add(message);
         db.SaveChanges();
         return RedirectToAction("SuccessfullySent");
      }
  
      ModelState.AddModelError("", "there is some error");
      return View(message);
  }
  </code></pre>
  
  <p>it works fine when captcha input is valid.
  problem is when captcha is invalid , the whole view is rendered in the div with id="Sent" . So i have two Message View rendered in one page. 
  How can i prevent it to render the whole view again in the div with id="Sent"?</p>