views:

66

answers:

3

Hi, 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

+4  A: 

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.

womp
It is not what i asked, but it helped me to figure out what to do , thanks
user1111111
A: 

Perhaps Cross-Page Postback is the thing you want?

Sebastian P.R. Gingter
no, continue executing the same page, and at the same time executing another one, the process is transparent to the user, and the user see only the page, it is like background work
user1111111
A: 

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.

JB King