Posted By

krisdb on 04/11/07


Tagged

ASP


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

asifrizvigmailcom


check file extension


 / Published in: ASP
 

  1. 'accepts: file extension, array of extensions allowed
  2. 'returns: boolean if extension if value
  3. function checkFileExt(sFileExt,sExtAllowed)
  4. checkFileExt = false
  5.  
  6. dim i
  7. dim arrExt: arrExt = split(sExtAllowed,",")
  8.  
  9. for i = 0 to ubound(arrExt)
  10. if lcase(sFileExt) = lcase(arrExt(i)) then
  11. checkFileExt = true
  12. exit function
  13. end if
  14. next
  15. end function

Report this snippet  

You need to login to post a comment.