<asp:RegularExpressionValidator
id="RegularExpressionValidator1" runat="server"
ErrorMessage="Only images are allowed!"
ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))
+(.jpg|.JPG|.gif|.GIF|.png|.PNG|.jpeg|.JPEG)$"
ControlToValidate="fileUpEx"></asp:RegularExpressionValidator>
<asp:FileUpload ID="fileUpEx" runat="server" />
Whatever file I pick, this throws the validator even if the file is an image file, any ideas?