user1848942
user1848942

Reputation: 355

How to show progress bar while loading some controls?

My controls are dynamically generated when the dropdownlist is changed by user. They values are loaded from the database. How to display progressbar during the generation of control?

Upvotes: 4

Views: 2075

Answers (4)

Tleck Aipov
Tleck Aipov

Reputation: 494

You can add download image on the form. When user will change item in dropdownlist call the event onchange with javascript. There is example for adding handler:

protected void Page_Load(object sender, EventArgs e)
        {
           dropdownlist1.Attributes.Add("onchange", "document.getElementById(\"loading_image\").style.visibility = \"visible\";");
        }

Before that you must add image on the form:

<img style="visibility:hidden;" src="imageurl" runat="server" id="loading_image" />

Upvotes: 1

RajEsh
RajEsh

Reputation: 89

if(combobox.text=="type selected value") { load the progress bar here.. }

Upvotes: 1

vendettamit
vendettamit

Reputation: 14687

For showing actual progress you need a Context-Sensitive progress bar. Here is the article that is showing how to show actual progress through ajax of server side operations.

Upvotes: 0

parker.sikand
parker.sikand

Reputation: 1381

After the user makes the selection, insert an <img> tag with an animated .gif progress bar. When the controls are returned to load onto the page, use javascript to delete the <img> tag and insert your controls.

Upvotes: 0

Related Questions