ASP.NET: Stop code execution
<p>I have a ASP.NET website where a user gets large data from a DB by clicking a button, but some times the user want to cancel the job(these jobs can take a very long time) and their session will hang while doing this job.</p>

<p>Is there any way to stop the execution of code and clean the already collected data ?</p>

<p>Is the best solution to have a table with all the jobIDs where a bit will determine if the code can continue and let the user change this from a button/link.</p>
