I am working on an ASP web page that handles file uploads. Only certain types of files are allowed to be uploaded, like .XLS, .XML, .CSV, .TXT, .PDF, .PPT, etc.
One way would be to check for certain signatures or magic numbers in the files. This page has a handy list of known file signatures and seems quite up to date: