identify the file type

i need to create web page  (in and c# 2.0) that lets the user upload files and sorts them into the following broad categories (a)audio (b)video (c)document (d)any other file.

i require implementation appraoch for the sorting logic. can anyone help? thanks
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Create an array with all the file types you support and concatenate a category to each one, example:
Then loop through and find a match based on extention and use the last character to map to a category.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vkkconsulAuthor Commented:
i appreciate the suggestion to use file type method. i am wondering is there any inherent feature of .net that provides this kind of clasification (thru tags/attributes etc.).  
There is none i know of, file extentions indicate the file type, there is no categorization of extentions present inherently in windows or .net that i am aware of. This is a custom grouping and you would need to code the different groups.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.