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.
View:
<% using (Html.BeginForm()){%>
....
<input id="submitsearch" type="submit" value="DownloadFile" name="SubmitButton" />
<%} %>
Controller:
return File(FileContent, "text/plain", Filename);
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.
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.
Restriction is that I cannot use an ajax call to submit the page.
Cheers.