I have a system in which I allow users (admins) to request batch emails be sent. I would like it to make it so that when the request is made I programatically ping a page (passing query string values)
I want to do it this way instead of just executing the method on the page its called because I’m afraid of the user leaving the page before the method is done executing – is my approach correct? Could someone point me in the right direction with sample code as I’m not even sure what code to use to make this happen.
Based on the comments in your question, the whole premise is incorrect.
When a user leaves a page after clicking a button, this will not abort the request on the server – the server will continue to process the request as normal (the server can’t tell that the user has left the page – this is a consequence of HTTP being a stateless protocol).