Hi,
Please test the example below. Upload a file large than 10 kb.
- <%@ Page Language="C#" %>
-
- <!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 runat="server">
- <title>Untitled Page</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <CuteWebUI:UploadAttachments ID="uploader1" runat="server">
- <ValidateOption MaxSizeKB="10" />
- </CuteWebUI:UploadAttachments>
- </div>
- </form>
- </body>
- </html>
-
- <script>
- function CuteWebUI_AjaxUploader_OnError(msg)
-
- {
- if(msg.indexOf("The maximum file size allowed is set to")!=-1)
- {
- alert("This is a customized information");
- return false;
- }
- }
- </script>
Regards,
ken