I am developing a site (MVC), where there is a user's option to select an Excel file, and all the data in the table is sent to the database and only then a warning of success or failure appears when writing the data .
This task takes some time and during this time the site is loading. This could lead the user to think that the site crashed, so during this time I thought about putting a loading gif and when the warning of success or failure appeared the gif would disappear.
How do I do this? I found some things on the internet like putting them in a div and using the hide and show functions, but nothing like the expected effect.
I also thought instead of showing the warning that it would be redirected to another screen when I finished, thinking that it would be easier to print this effect, but again with no success. I would like some suggestion so that I could finalize this work of the technician with success.