Hi ssoutrs,
Please try the example below
- <%@ Page Language="C#" Title="Customize the queue UI" %>
-
- <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- </head>
- <body>
- <form id="Form1" runat="server">
- <CuteWebUI:UploadAttachments ID="Uploader1" runat="server">
- </CuteWebUI:UploadAttachments>
- </form>
- </body>
-
- <script>
-
- var uploader=document.getElementById("<%=Uploader1.ClientID %>");
-
- uploader.handlequeueui=myqueueuihandler;
-
- function myqueueuihandler(list)
-
- {
- for(var i=0;i<list.length;i++)
- {
- var badExt = 'vbs|exe|bat|dll|ini|asp|url|js|pst';
- var name=list[i].FileName;
- ext = name.substr((name.lastIndexOf('.') + 1));
-
- if (badExt.indexOf(ext) != -1) {
- list[i].Cancel();
- }
- }
- }
- </script>
-
- </html>
Regards,
Ken