Hi rmacfadyen,
The example below shows you how to catch the error and show your customize information.
- <%@ Page Language="C#" %>
-
- <%@ Register Assembly="CuteWebUI.AjaxUploader" Namespace="CuteWebUI" TagPrefix="CuteWebUI" %>
- <!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:Uploader ID="uploader1" runat="server">
- <ValidateOption MaxSizeKB="10" />
- </CuteWebUI:Uploader>
- </div>
- </form>
- </body>
- </html>
- <script>
- function CuteWebUI_AjaxUploader_OnError(msg)
- {
- if(msg.indexOf("The maximum file size allowed is set to")!=-1)
- {
-
- alert("The file is locked");
- return false;
- }
- }
- </script>
Regards,
ken