ASP.NET File Upload Progress - OnClientFileCleared function


If OnClientFileCleared server-side property is set to some client-side function, this function is called with one parameter.
This parameter is a string with file names cleared from form's inputs because of their not allowed extensions.
File names are delimited with "\n" character.

Sample

<%@ Register TagPrefix="fup" Namespace="OboutInc.FileUpload" Assembly="obout_FileUpload"%>
...
<script type="text/JavaScript">
function ClearedFiles(fileNames){
  alert("Cleared files with bad extensions:\n\n"+fileNames);
}
</script>
...
  <fup:FileUploadProgress OnClientFileCleared="ClearedFiles" runat="server">
  <AllowedFileFormats>
  <fup:Format Ext="gif" MaxByteSize="10240"/>
  <fup:Format Ext="jpg" MaxByteSize="10240"/>
  <fup:Format Ext="jpeg" MaxByteSize="10240"/>
  <fup:Format Ext="png" MaxByteSize="10240"/>
  </AllowedFileFormats>
  </fup:FileUploadProgress>

See also working example Allowed file extensions and sizes.