ASP Uploader Class Reference

Uploader.DialogFilter Property

Gets or sets the current file name filter string, which determines the choices that appear in the file browser dialog box. Please note that only ValidateOption.AllowedFileExtensions property determine the allowed file extensions for uploading.


For each filtering option, the filter string contains a description of the filter, followed by the vertical bar (|) and the filter pattern. The strings for different filtering options are separated by the vertical bar.

The following is an example of a filter string:

Text files (*.txt)|*.txt|All files (*.*)|*.*

You can add several filter patterns to a filter by separating the file types with semicolons, for example:

Image Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*

Example Code

  1. <%Language="VBScript" %>  
  2. <!-- #include file="aspuploader/include_aspuploader.asp" -->  
  3. <html>   
  4. <body>   
  5.         <form id="form1" method="POST">   
  6.             <%
  7.                 Dim uploader   
  8.                 Set uploader=new AspUploader   
  9.                 uploader.Name="myuploader"
  10.                 uploader.DialogFilter="Images (jpg/gif/png)|*.jpg;*.gif;*.png|All files (*.*)|*.*"
  11.                 uploader.Render()  
  12.             %>
  13.         </form>   
  14. </body>   
  15. </html>