title: MVC 5 prevent page refresh on form submit
body: <p>yBrowser: IE9
  Technologies: MVC5</p>
  
  <p>I am mainly using Angular for everything on my page. (Single Page App). </p>
  
  <p>But because I am working with IE9, I can't use FileAPI.. So, I decided to go with MVC's Form Actions to get HttpPostedFileBase in my controller methods to handle fileupload. </p>
  
  <p><strong>Html Code:</strong> (Is present in a modal)</p>
  
  <pre><code>@using (Html.BeginForm("UploadTempFileToServer", "Attachment", FormMethod.Post, new { enctype = "multipart/form-data", id = "attachmentForm" }))
  {
      &lt;div&gt;
          &lt;span id="addFiles" class="btn btn-success fileinput-button" ng-class="{disabled: disabled}" onclick="$('#fileUpload').click();"&gt;
              &lt;span&gt;Add files...&lt;/span&gt;
          &lt;/span&gt;
          &lt;input id="fileUpload" type="file" name="files" class="fileInput" onchange="angular.element(this).scope().fileAdded(this)" /&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;span class="control-label bold"&gt;{{currentFilePath}}&lt;/span&gt;
          &lt;input name="fileUniqueName" value="{{fileUniqueName}}" /&gt;
          &lt;input id="attachmentSubmit" type="submit" value="Upload File" /&gt;
      &lt;/div&gt;
  }
  </code></pre>
  
  <p><strong>MVC Controller:</strong></p>
  
  <pre><code>public void UploadTempFileToServer(IEnumerable&lt;HttpPostedFileBase&gt; files, string fileUniqueName)
      {
          var folderPath = fileStorageFolder;
  
          foreach (var file in files)
          {
              if (file.ContentLength &gt; 0)
              {
                  file.SaveAs(folderPath + fileUniqueName);
              }
          }
      }
  </code></pre>
  
  <p><strong>Question #1</strong>: Does anyone know of a way to send the HttpPostedFileBase data to the controller, without using form's submit action?</p>
  
  <p>I don't mind using Jquery if need be. I have tried hijacking the form's submit action and that didn't work. 
  I tried sending the file control's data using non submit button event, but no luck there either.</p>
  
  <p><strong>If not:</strong></p>
  
  <p><strong>Question #2</strong> How do I prevent the page from going to /Attachment/UploadTempFileToServer after the execution of submit is completed?</p>