I am trying to do a clientside validation on filename expression. I do not want to have :, /, %, etc in my file names. How do you guys do that?
1 Answer, 1 is accepted
answered on 05 Sep 2016, 12:26 PM
You can prevent the upload of files with names containing special characters, "/%" for example, by subscribing to the AsyncUpload's OnClientFileUploading event and cancelling the event in case the filename contains a forbidden character:
The event will fire for every selected file, so in case you are selecting multiple files (MultipleFileSelection="Automatic") the event will be cancelled only for those with special characters in their name.
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.