Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think you still need javascript but dont need to use the AJAX update panel.</p> <ol> <li>on your page add a div with an progress animated image</li> <li>set the div to hidden using CSS</li> <li>on your linkbutton/button or whatever, link up your onClick event as normal</li> <li>on the same linkbutton/button add an onClientClick attribute and call a javascript function to set the div style to visible</li> </ol> <p>this will in effect display the progress meter until the page has actually posted back. </p> <p><strong>Wired up Button</strong> </p> <pre><code> &lt;asp:Button ID="btnProgress" runat="server" Text="show progress" OnClientClick="javascript:DisplayProgress()" OnClick="btnProgress_Click" CausesValidation="false" /&gt; </code></pre> <p><strong>Progress Meter Div</strong></p> <pre><code> &lt;div ID="pnlProgress" Class="modalBackground" style="visibility: hidden;"&gt; &lt;div id="content" class="modalDialogClear" style="text-align: center; " &gt; &lt;br /&gt; &lt;br /&gt; looking up address, please wait...&lt;br /&gt; &lt;img src="/images/progress_bar.gif" /&gt; &lt;/div&gt; </code></pre> <p><strong>Javascript</strong></p> <pre><code> function DisplayProgress() { document.getElementById('pnlProgress').style.visibility = 'visible'; window.setTimeout(HideProgressPanel, 20000); //handles hiding the progress panel should the operation time out } function HideProgressPanel() { document.getElementById('pnlProgress').style.visibility = "hidden", 20000 } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload