Last post Apr 28, 2010 11:45 AM by jagdipa
Apr 28, 2010 01:04 AM|pavvu_kk|LINK
I'm using ASP.NET 3.5.
I've a page, say page1.aspx, in my application. I need to aggregate data from 4 different services (external to application) and show the data on the page. Of these 4 services, 2 are WCF services, 1 is an asmx service and 1 is exposed over plain HTTP (HTTPRequest
The way my page layout will be defined is that I will have multiple areas in the page. Each area will display data from one or more services above. E.g. Area1 on the page will aggregate data from, say WCFService1 and WCFService2. Similarly, Area2 will display
data aggregated from WCFService2 and ASMXService.
The requirement here is that when the data fetch should start only after the page loads i.e. my page should load first, and then in the background data should be fetched from the various services above. As soon as my page loads, there will be rotating progress
bars in each of the areas. As and when data is recieved for those areas, the data will be displayed.
How can this be achieved?
Apr 28, 2010 04:04 AM|jagdipa|LINK
I am not 100% sure on this - but here is an idea.
First create 4 pages for each of the 4 services. Each page will only be responsible for loading the data for one service.
Then, on your main page, page1.aspx, create iFrames for each of the 4 pages you made.
If I am correct, the page will load first, and then the 4 pages in the iFrame will load seperately.
Apr 28, 2010 09:08 AM|pavvu_kk|LINK
I was as well thinking of the iFrame idea but was not very confident. However, after seeing another like-minded person, I've decided to try out a POC and check
Thanks a lot for your inputs Jagdip.
Apr 28, 2010 11:45 AM|jagdipa|LINK
This idea is quite complicated, but .....
1. Create the page as a single page with all the services - just to make sure everything works. Doesnt matter if it takes a long time to load.
2. Change the code so that the services do not load on page load.
3. Put each of the outputs from the services in an AJAX panel.
4. Put a hidden button in each of the AJAX Panels.
6. In the code behind for each of the hidden buttons, actually start a thread and load the services in the thread. Pass back either a 'in progress' message, or the actual results of the services.
I have seen this being done before, but it was complicated. I am sure there is an easy way. Have a quick search for ASP.NET and Threading, I'm sure you will find some articles in Google.