Table of Contents
  • Getting Started
  • EO.Pdf
  • EO.Web
    • Overview
    • Installation & Deployement
    • EO.Web ToolTip
    • EO.Web Rating
    • EO.Web Slider & RangeSlider
    • EO.Web ListBox
    • EO.Web ComboBox
    • EO.Web Captcha
    • EO.Web ASPX To PDF
    • EO.Web Slide
    • EO.Web Flyout
    • EO.Web EditableLabel
    • EO.Web ImageZoom
    • EO.Web Floater
    • EO.Web Downloader
    • EO.Web ColorPicker
    • EO.Web HTML Editor
    • EO.Web File Explorer
    • EO.Web SpellChecker
    • EO.Web Grid
    • EO.Web MaskedEdit
    • EO.Web Splitter
    • EO.Web Menu
    • EO.Web Slide Menu
    • EO.Web TabStrip
    • EO.Web TreeView
    • EO.Web Calendar
    • EO.Web Callback
    • EO.Web MultiPage
    • EO.Web Dialog
    • EO.Web AJAXUploader
    • EO.Web ProgressBar - Free!
    • EO.Web ToolBar - Free!
  • EO.WebBrowser
  • EO.Wpf
  • Common Topics
  • Reference
Filtering Folder and Files

It is often necessary to restrict the FileExplorer to only display certain files. For example, an image browser wish to only display image files.

Filtering files by extension

To filter files by extension, set the FileExplorer's AllowedExtension property. Multiple extensions can be separated by "|", for example, ".gif|.jpg".

AllowedExtension applies to both file listing and file upload. When user tries to upload a file with an extension that does not match AllowedExtension, an error message will be displayed. To customize the error message, handle the AJAXUploader control's ClientSideOnError event.

Filtering files by regular expression

EO.Web FileExplorer can also filter files/folders using regular expression. To use this feature, simply set FileNameFilter or FolderNameFilter to a regular expression. For example, setting FolderNameFilter to

2008[\w\W]*
only displays folders that start with "2008".

Custom Naming Scheme

It is often desired to rename user uploaded files based on certain file naming scheme to better organize all those files. EO.Web FileExplorer offers FileUploaded for that purpose. The event is fired for each uploaded file so that you can rename the file based on whatever name scheme your application uses. A sample in the sample package demonstrated how to rename each uploaded file to contain the date information.