Re: Customizing the Progress Bar

  •  04-20-2011, 8:06 AM

    Re: Customizing the Progress Bar

    Dear chrisluo,
     
    Please refer to the following snippet:
     
    <%@ Page Language="C#" %>
    <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Sample</title>
        <style>
            .AjaxUploaderCancelAllButton
            {
                display: none !important;
            }
        </style>

        <script type="text/javascript">
            function CuteWebUI_AjaxUploader_OnQueueUI(list) {
                var mycancelall = document.getElementById("mycancelall"); if (list.length < 2) {
                    mycancelall.style.display = "none"; return;
                }
                mycancelall.style.display = "";
            }
            function DoCancelAll() {
                var uploader = document.getElementById('<%=UploadAttachments1.ClientID %>');
                uploader.cancelall();
            }  
        </script>

    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <CuteWebUI:UploadAttachments runat="server" ID="UploadAttachments1" />
            <hr />
            <asp:Button runat="server" ID="BtnSubmit" Text="MySubmit" />
            <button id="mycancelall" onclick="DoCancelAll();return false;" style="display: none">
                Cancel All Uploads</button>
        </div>
        </form>
    </body>
    </html>

    Thank you for asking
View Complete Thread