Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mix HTML with VBscript or should you use all Vbscript? 1

Status
Not open for further replies.

wassup

Technical User
Oct 3, 2000
52
GB
When using ASP pages is it best to mix HTML with VBscript or should you use all Vbscript?


I have an asp page which has a large number of records to display and it currently seems to wait until the end of the asp page before displaying the page.

I have seen asp pages which will start to display the top records as soon as you request the page and then keep write records to the screen as you are looking at the first records.

Any ideas how this is done.

Thanks
 
from a performance standpoint, it's best to try to avoid switching frequently between html and vbscript. when IIS encounters the ASP code delimiter (<%) it passes the code through the ASP dll, until it encounters the ending delimiter (%>), at which point it switches back to simple http mode. The more times this happens, the more work the server has to do. Its ok to mix the two, but try to keep the context switching to a minimum.

to display results before the whole page is finished, make sure buffering is off (response.buffer=false), then periodically use response.flush to display the interim results.



nick bulka

 
The records whill not be displayed until the table is closed </table>
 
Of course, this will depend on exactly how your code is written. Unfortunately, what you say is always true for Netscape (at least versions before 6. Not sure yet about Netscape 6. IE, however, should flush the buffer as expected.

To get around the Netsape limitations, you could try making each record a table, and don't nest them inside other tables.

nick bulka

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top