3

ASP.Net FileUpload not working in google chrome.It shows validation error,even after choosing right file type.Any solution ?

Here is a code :

 <asp:FileUpload ID="FU1" runat="server" /> <asp:RegularExpressionValidator id="FileUpLoadValidator" runat="server" ErrorMessage="Upload jpg and gif only." ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.jpg|.JPG|.gif|.GIF)$" ControlToValidate="FU1"> </asp:RegularExpressionValidator> 

1 Answer 1

4

Do you still get the error when you use a more open regex?

ValidationExpression="^.+\.((jpg)|(JPG))$" 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.