This topic is locked

Getting the file type automatically

10/30/2006 10:30:09 AM
ASPRunnerPro General questions
orit author

In application that enables file upload, I would like to place an icon that tells the file type. I have images of all the file types that are named: bar<fileExtension>.gif, for example: bardoc.gif, barxls.gif, barppt.gif etc.

How can I extract the type of the file that I uploaded (the file name is saved in a field) and make it appear beside the downloaded file in list view?
Thanks

Sergey Kornilov admin 10/30/2006

Set View type of file name field to Custom in ASPRunnerPro 4.1.
Something like this will work:

strValue = "<img src=images/bar" & Right(strValue,3) & ".gif border=0>"