Logic after Response.Write() in vb.net

58 Views Asked by At

I have a webpage that has to respond very quickly to each client, as many requests will be made to the page. I am using Response.Write(data) to write the data that is generated back to the client.

But this is where I want the flow of data to stop, per se. I have logic after the Response.Write() statement, but I want the client to have received the data from Response.Write() before this code executes; I do not want this code to hold up the client, as I am running some SQL queries in a few cases.

My initial thought is to spawn a new thread to handle the logic, but are there any caveats to new threads from a website? A new thread would continue processing while the data flow would effectively be "stopped" as stated above, correct? Is there a better way to address my problem?

0

There are 0 best solutions below