Sneaky ASP Tricks Part 1: Display Progress During ASP Page Processing

Sneaky ASP Tricks Part 1: Display Progress During ASP Page Processing

hat’s a Sneaky ASP Trick? It’s a simple, elegant non-traditional solution to an ASP development issue. This article explains how to display a progress indicator in your ASP page when it is processing. “Can’t be done,” you say? It can, with a Sneaky ASP trick.

Let’s say you have an ASP page that is doing some processing before outputting data. You might be accessing a database, running a query, and formatting your data?all of which takes time. When this is going on, your user could be viewing a blank page with the browser’s top right hand corner icon spinning (or whatever else it does). There will be an hourglass cursor on this page so the user knows something is happening. But frequently, if users do not get a visible response in a few seconds, they may go away from your page. So how do you display a progress bar on your page?

The answer is very simple and sneaky. It requires using some space on your resulting page to display a progress bar. In this space, display an animated GIF that mimics a progress bar. When your processing is all done, just make this progress bar disappear. Simple, no?

Let’s see this in action with an example. Let’s say you have a reporting application, in which the user asks for a report, inputs the necessary parameters for the report, and then hits the submit button. Your ASP page goes to work generating the report and then outputs the data?after a very long time. During this time, you want your user to view the progress bar. This is how you would do it….

  1. Make sure your ASP page (the one that does the processing) outputs the top Title of your report. In this space, we will also include an image as follows:

    Generating Report, Please Wait... A Sample Activity Report

  2. In the above code, the points to a special animated GIF (rpt_prog_bar.gif). This image has been created to give the effect of a progress bar in motion. This is what it looks like:

  3. Continue your processing, outputting your data as and when it is ready. During all that processing, your user is viewing the progress-bar GIF and is therefore occupied.

  4. When you have finished your processing, and your data is sent back to the browser, the page’s ONLOAD function kicks in. In the tag, you have specified a piece of JavaScript code that makes your image disappear. This is done with this line of code:

What happens is that when the page is done processing, and all data has reached the browser, the animated GIF is replaced by a different GIF?a blank, single pixel GIF that essentially makes the animated GIF disappear! And voilá, when your page is in processing stage, you have a progress bar. When the processing is done, it disappears.

To see a working example of this, browse to Click on the link at the bottom to view the Sneaky ASP Trick in action.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes