HTML form hangs when no respond received

mark goldin 696 Reputation points
2021-12-11T12:33:52.147+00:00

I have an HTML form where Its action is an ASP page. Under certain scenario I want to create a file in the ASP page and return it back. That works fine, but the form continues waiting for the respond. Is there a way t return something to the form while sending a file back?

Thanks

Developer technologies | ASP.NET | Other
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
    2021-12-12T18:21:41.1+00:00

    Not supported by the browser. While there is no way to detect if the download completed successfully on the client side, you can use JavaScript to poll the server to check if it was successfully sent. Use a request Id, then the JavaScript uses a timer and Ajax to check the status of the download. Be sure to not use session on the ajax call.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. mark goldin 696 Reputation points
    2021-12-11T19:21:17.087+00:00

    I need the files to be downloaded by the Browser. The form data is not important, all I want is to say that download is done.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.