Modal Progress Sample
Select files to upload:
|
Uploading ,
(calculating).
|
|
Currently uploading:
,
file
of
.
|
|
Speed:
(calculating).
|
|
About
(calculating) remaining.
|
|
|
Cancel
NOTE: the maximum allowed request size for this sample is 1000 MB. If you attempt to upload files larger than this,
you will recieve a oversized upload error which SlickUpload will handle gracefully. This is controlled by the maxRequestLength attribute of the
httpRuntime key in the web.config file.
Description
The SlickUpload progress display is templatable and customizable, meaning it can easily be shown in an AJAX style modal if desired.
This sample shows a simple modal, but any modal library could be used, including something like jQuery thickbox or the AjaxControlToolkit ModalPopupExtender.
The simple modal shown here consists of a mask layer and modal container, styled to provide the modal look and feel:
<div id="modal-mask" style="position:absolute;left:0;top:0;right:0;bottom:0;background-color:#000;opacity:.5;filter: alpha(opacity=50);-moz-opacity: .5;"></div>
<div id="modal" style="position:absolute;border:solid 1px #888;width:50%;background-color:#fff;padding:1em">
To position the modal, we add a handler to the control that fires when the upload has been started:
<kw:SlickUpload ... OnClientUploadStarted="showProgressModal" ... />
In this example, the code in the showProgressModal just positions the simple modal. If you were using a different modal library, this would be where you could invoke the modal dialog to wrap the progress div.
|