Posted on: 10/27/2014 10:47:52 AM | Views : 473

Hi,
I have a webform and I am using

<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="FileUpload1" ErrorMessage="Invalid Image File" style="font-family: Verdana; font-size: small; font-weight: 700; color: #000000" ValidationExpression="^([0-9a-zA-Z_\-~ :\\])+(\.jpg|\.JPG|.jpg|.JPG|.jpeg|.JPEG|.bmp|.BMP|.gif|.GIF|.png|.PNG)$">
Problem is when someone upload it like with file name ABC.JPG and it's look like this ABC.JPG.jpg
It's says invalid file although clicking on submit button works but I want to remove validation for such type of file as well. Basically  it should only focus on .jpg at the end if it's there then it shouldn't  show file is valid. Is there anyway to do this? thanks

< ...

Go to the complete details ...