FileUpload control - How to limit 'Files of Type'?

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

How do you limit the "Files of Type" selections in the dialog for a
FileUpload control?
 
FYI: Here's one way...

<asp:RegularExpressionValidator
id="RegularExpressionValidator1" runat="server"
ErrorMessage="Bad file type..."
ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.mpeg|.MPEG|.wmv|.WMV|.avi|.AVI|.mov|.MOV)$" ControlToValidate="FileUpload1"></asp:RegularExpressionValidator>"VB Programmer" <[email protected]> wrote in messageHow do you limit the "Files of Type" selections in the dialog for aFileUpload control?>
 
Back
Top