Link to home
Start Free TrialLog in
Avatar of Victor  Charles
Victor CharlesFlag for United States of America

asked on

Helf with speeding data displayed for multiple screens

Hello,

My project contains about 10 screens(panels) using the style of code below, how do I display the first screen only when the page loads as opposed to waiting till all the screens are ready to be displayed, this problem is really slowing down my screens display.


First when the page loads, a load file is called with the following stile of code


screen1:

Dim ItemA as new dataset
ItemA.Readxml (pathand filename)
Control1.Datasource =ItemA.Tables(0)
Control1.Datafield =
Control1.DatavaluField =
Control1.Databínd()
.
.
.
.10 contols

Sscreen 2 - screen10, each screens contain about 15 controls


I there a way to use a method to display one screen at a time?

Secondly, using the For Loop,

My code is in the following format:

SearchData()

For Each (Main)

  ....Search criteria

Screen 1

 Multiple  For Each
                   Next

Screen 2

        Multiple  For Each
                   Next

.
.
.
.Screen 10

         Multiple  For Each
                   Next


Next (Main)

ViewData()   which is in similar format as loadfile()

Is there a way to call a method after the last For each statement for each screen to display the data much faster rather than waiting for all the code to execute?

Victor
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland 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 Victor  Charles

ASKER

It ia a web app, with multiple panels.
How do I use load on demand to only load the first screen initially and load each screen when desired by the user?
I think the delay is mostly caused by all the For each loops rather than displaying the data in the controls, that is why i was hoping there was a way to use a method for each screen while using a main For Each loop needed for each screen.
Is it possible to call methods within the main For Each loop to display data from multiple screens using each method? or does the main For Loop needs to be completed before the data is displayed,  I do not it can be done, but would like to confirm with an expert.
Hi,

Or instead of a main For Each loop, would creating a For each loop for each screen execute separaely or would I still need to wait for all the For each loops to execute before the data can be displayed?
Without knowing the full code and the way its working, it would be very hard for me to suggest any fix.