Home arrow GIS Data & Resources arrow Scripts and Code arrow C# Code arrow C# & ArcGIS Server Busy Box Activity Indicator
C# & ArcGIS Server Busy Box Activity Indicator PDF Print E-mail

Written by Steve Gourley,

Busy Box .Net is a great tool to use if you are utilizing AJAX technologies where the user may not realize that their request is in fact being handled. But it also looks nice transitioning between asp pages.

What this tool does, is creates a modal popup showing a loading animation and locks the user from pressing other buttons while your web service or server side processing completes.  This then disallows the user to push buttons multiple times or try to do other things while your code is processing.

"BusyBoxDotNet is an ASP.NET library targeting UI enhancements in web applications. It provides libraries and web controls to ease otherwise time consuming tasks and provides support and seamless integration with the latest Ajax technologies."

I ran into some trouble using this control on ArcGIS Server mapping pages though.  The initial fix was setting the includescriptsinpage = true.  

Another issue that I came across were that some callbacks were tricking the control to thing a post back was going to happen.  Thus locking up the website waiting for it to fully refresh - which it never did.  This was also easily solveable.  Just turn the showbusybox setting to custom instead of OnLeavingPage.  Then replace your asp:button with a busyboxdotnet:busyboxbutton.  Then the only time the modal will show is when you fire the onclick event.

You can also use busybox hyperlinks and create your own custom panels.

Download the BusyBox dll




The code for busybox when on a non-mapping page

<busyboxdotnet:busybox id="BusyBox1" runat="server" showbusybox="OnLeavingPage" style="z-index: 125; left: 0px; position: absolute; top: 0px" fadeinduration="50" fadeineasing="EaseBoth" fadeonmouseoveropacity="10" image="GreyBar" includescriptsinpage="True" overlaycolor="DarkSeaGreen" text="Loading... Please wait."></busyboxdotnet:busybox>

The code for busybox when on a mapping page

<busyboxdotnet:busybox id="BusyBox1" runat="server" showbusybox="Custom" style="z-index: 125; left: 0px; position: absolute; top: 0px" fadeinduration="50" fadeineasing="EaseBoth" fadeonmouseoveropacity="10" image="GreyBar" includescriptsinpage="True" overlaycolor="DarkSeaGreen" text="Loading... Please wait."></busyboxdotnet:busybox>

The code for busybox when using a button

<busyboxdotnet:busyboxbutton runat="server" id="SubmitGeom" onclick="Submit_Click" busyboxtoshow="BusyBox1" Text="Submit"></busyboxdotnet:busyboxbutton>


Users' Comments  
 

No comment posted

Add your comment

13, Mar. 2008
Last Updated ( 13, Mar. 2008 )
 
< Prev   Next >

AGRC Contacts | UGIC Contacts

feed image feed image

Utah GIS Portal © 2009 AGRC

Optimized for