You can use OnError event to hide the default error message alert box.
function CuteWebUI_AjaxUploader_OnError(msg)
{
return false;
}
The following is one runnable example:
<%@ Page Language="C#" %>
<script runat="server">
protected void UploadAttachments1_FileValidating(object sender, UploaderEventArgs args) { if (args.FileSize > 5) throw (new Exception("file should not larger then 10K")); }</script>
<html xmlns="
http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<CuteWebUI:UploadAttachments runat="server" ID="UploadAttachments1" OnFileValidating="UploadAttachments1_FileValidating">
</CuteWebUI:UploadAttachments>
</div>
<div id="diverrormsg">
</div>
</form>
<script type="text/javascript"> function CuteWebUI_AjaxUploader_OnError(msg) { return false; } </script>
</body>
</html>
Regards,
Eric