Regular Expression Validator | No special characters

Discussion in 'ASP.NET 2.0' started by RajanAM, Jun 23, 2008.

  1. I) I have this ValidationExpression in my Regular Expression Validator for uploading image files.


    ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.jpg|.JPG|.gif|.GIF)$"


    But it did not prevent someone frombeing able to upload a jpg file with special characters in its name ^^^^^^^^^^^.jpg


    Howdo I change the above ValidationExpression to prevent file names having special characters being uploaded?


    II) The second related issue is now I am unable to delete this file even though I have FTP read/write access in Windows Explorer.


    Iget the message 'An error occured deleted the file or folder on the FTP server.Make sure you have permissions to access this folder.


    Details:


    550^^^^^^^^^^^.jpg: The system cannot find the file specified.


    Any suggestions?


    Thank you.
     

Share This Page