Bart
Bart

Reputation: 4920

how to execute a asp.net page asynchronously?

how to execute a asp.net page asynchronously?

So I am displaying a page to the user, but when an event happen, I need to execute another page, without using ajax, but using C# code.

I am using asp.net webforms.

thanks

Upvotes: 0

Views: 239

Answers (3)

JB King
JB King

Reputation: 11910

Create another Thread and have it execute the code required, assuming that it is code and not really another page, as it almost seems like you want to return multiple pages for a single request which to my mind is really poor design.

Upvotes: 0

Sebastian P.R. Gingter
Sebastian P.R. Gingter

Reputation: 6085

Perhaps Cross-Page Postback is the thing you want?

Upvotes: 0

womp
womp

Reputation: 116987

Do you really need to execute a whole page? That doesn't sound like good design.

You should factor out whatever functionality you need from your page into standalone classes, and simply invoke the method you need to process using the appropriate threading methods.

For a great discussion on how to properly queue background tasks in ASP.Net, check out this post.

Upvotes: 4

Related Questions