title: Prevent updating html with some conditions in MVC Ajax.BeginForm?
body: <p>I have the following code in my View,<br>
  It's for searching in a site, a user can submit the following form multiple times.</p>
  
  <pre><code>@using (Ajax.BeginRouteForm("Search", new AjaxOptions
  {
      InsertionMode = InsertionMode.Replace,
      UpdateTargetId = "SearchContents",
      LoadingElementId = "SearchAjaxLoader",
      OnSuccess = "SearchLoadContentsOnSuccess",
      OnFailure = "SearchLoadContentsOnFailure",
      OnBegin = "SearchLoadContentsOnBegin",
      OnComplete = "SearchLoadContentsOnComplete",
  }))
  {
     @Html.AntiForgeryToken()
     &lt;input type="text" name="Search" /&gt;
     &lt;input type="submit" value="Submit" /&gt;
  }
  </code></pre>
  
  <p>I wanna reject old ajax results and show the latest ajax result only.<br>
  In a non mvc Ajax form, I was creating an array as ajax counter and compare the server responses with it to prevent update html.<br>
  I wanna know how I can prevent <code>Ajax.BeginForm</code> to update Html on some conditions.</p>