title: ASP.NET Success Callback with HTML.BeginForm()
body: <p>I need to add functionality to an existing form in ASP.NET. I would like to fire a Javascript function after the existing validations have cleared and the form is submitted and change as little of the existing code as possible. </p>
  
  <p>My question:<br>
  Is there a success callback with <code>HTML.BeginForm()</code>?<br>
  I am trying to replicate the functionality from <a href="https://stackoverflow.com/a/8036779/3100284">this SO answer</a> which uses <code>Ajax.BeginForm()</code>.</p>
  
  <p>My constraints:<br>
  All of the validation and rendering is already in place, so I would like to do this with <code>HTML.BeginForm()</code> instead of <code>Ajax.BeginForm()</code> at the view level without messing with the controller at all, if possible.  </p>
  
  <p>Existing form:  </p>
  
  <pre><code> @using (Html.BeginForm("SignUp", "Location", FormMethod.Post))
      {
          &lt;div class="clearfix"&gt;
              &lt;input type="hidden" name="Member.Page" value="@(ViewBag.PageType)" /&gt;
              &lt;input id="inputMemberType" type="hidden" name="Member.Type" value="@(Enumeration.Subscription.Global)" /&gt;
              @Html.TextBoxFor(model =&gt; model.Member.Email, new { id = "textEmail", @class = "left", placeholder =  (LanguageManager.GetText(LanguageConst.SIGNUP_PH_EMAIL)) })
              &lt;input id="buttonSignUp" type="submit" class="left" value="@(LanguageManager.GetText(LanguageConst.SIGNUP_BTN_SIGNUP))" /&gt;
              &lt;div class="left"&gt;
                  @Html.ValidationMessageFor(model =&gt; model.Member.Email, string.Empty, new { @class = "container-error", style = "color:white;" })
              &lt;/div&gt;
          &lt;/div&gt;
      }
  </code></pre>
  
  <p>I am rather unfamiliar with ASP.NET, so any help is appreciated.</p>
  
  <p>Related:<br>
  <a href="https://msdn.microsoft.com/en-us/library/system.web.mvc.html.formextensions.beginform(v=vs.118).aspx" rel="nofollow noreferrer">BeginForm Documentation</a></p>