File Extension Validation

File Extension Validation

Restrict uploads to specific file types using AllowedExtensions. Only files with matching extensions will be accepted. Files that don't match are rejected with a message.

Images Only (.jpg, .png, .gif)
Drag & drop files here, or paste from clipboard
<%@ Register Assembly="AjaxUploader" Namespace="AjaxUploader.Controls" TagPrefix="au" %>

<au:AjaxFileUpload ID="Uploader1" runat="server"
    AllowedExtensions=".jpg,.png,.gif"
    ButtonText="Select Image"
    AutoUpload="true"
    ShowProgress="true" />

Try selecting a .txt or .pdf file to see the validation error.