Link to home
Start Free TrialLog in
Avatar of Xian1979
Xian1979

asked on

ASP.Net getting data from a background thread?

Hi,

I have a web page that queries a computer on the network for things like, hard disk details, ram, baseboard, users, etc.. via the WMI / SNMP and binds the result to a GridView.  This works fine but the problem is that the page takes ages to load becuase it has to wait for each request to finish before it loads the page.

So along come UpdatePanels which are unfortunately asynchronous so it sitll takes as long to load.

Next come's threading which I believe is the answer but can't quite get the code right.  I can create multiple threads in the background to run each request, but i cant return the results to the page.  I imagine multple UpdatePanels which refresh every second until its designated thread has finished and then display the result and stop refreshing.  Which means some UpdatePanels will stop refreshing before others.

So how can you get the result from a background thread and display it to the web page?  Preferably the threads must run in a differnt pool to ASP.NET so it doesn't slow down the site.

Many thanks for your expertise.
SOLUTION
Avatar of GiftsonDJohn
GiftsonDJohn
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Xian1979
Xian1979

ASKER

Hi GiftsonDJohn,

Thank you for your reply.

How do you see this code as a solution to my problem?  I can see that it's possible to throw an exception across threads but then how would you actually get say a DataTable bound to a GridView within an UpdatePanel?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial