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
vcharlesAsked:
Who is Participating?
 
CodeCruiserCommented:
What screens are we talking about? Is it a web app? If so, you may need to consider load on demand from client side.
0
 
vcharlesAuthor Commented:
It ia a web app, with multiple panels.
0
 
vcharlesAuthor Commented:
How do I use load on demand to only load the first screen initially and load each screen when desired by the user?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
vcharlesAuthor Commented:
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.
0
 
vcharlesAuthor Commented:
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.
0
 
vcharlesAuthor Commented:
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?
0
 
CodeCruiserCommented:
Without knowing the full code and the way its working, it would be very hard for me to suggest any fix.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.