Saravanan Ponnusamy

Saravanan Ponnusamy

  • 355
  • 4.4k
  • 1.1m

How to Stop ongoing process

Jun 27 2018 8:11 AM
im sending datas using resetful API..
 
for example im trying to send 500 datas.. so im getting those 500datas from database and storing in datatable.. and by using for-loop, sending row by row ... everything working fine..
 
but here my task .. i need to stop that process whenever i need,,
 
for example, currently 124th or 325th or 98th or any position.... data is runing in for-loop, so when i click on "stop" button, the for-loop should get break and stop sending data's...
 
how to stop the process??
 
my code   is running in server side .. i need to stop that..
 
i tried like, mainted one variable and validating that variable inside the for-loop, when the variable value is 0 it continue to run, if the variable value is 1 i want break the loop...
 
how to do that??
 

Answers (2)