title: Capturing form.submit() response in MVC
body: <p>When submitting a form (form.submit() and without ajax), is there any way to detect if a response came back (assuming a new page isn't loaded). From the controller I'm actually returning a file rather than a new View.</p>
  
  <p>View:</p>
  
  <pre><code>&lt;% using (Html.BeginForm()){%&gt;
     ....
     &lt;input id="submitsearch" type="submit" value="DownloadFile" name="SubmitButton" /&gt;
  &lt;%} %&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>return File(FileContent, "text/plain", Filename);
  </code></pre>
  
  <p>Basically what I want to happen is that when the user clicks submit, I display a loading icon and when the download popup appears I want to remove the loading icon.</p>
  
  <p>So I do not actually need to read the response, but just know when the response comes back so i can remove the loading icon.</p>
  
  <p>Restriction is that I cannot use an ajax call to submit the page.</p>
  
  <p>Cheers.</p>