Hi Michael,
This is going to be a bit problematic, as MIME types are registered for
some, but not all file types. As to whether the browser will recognize a
given MIME type, that is also somewhat iffy, depending upon the browser, and
the ubiquitousness of the individual MIME type. Some are much more common
than others.
There is no class that will figure out a MIME type from a file extension,
but you could ostensibly write your own. Here is an excellent reference on
the available registered MIME types:
http://www.iana.org/assignments/media-types/
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
"Michael Loughry" <Michael
Lo*****@discussions.microsoft.com> wrote in
message news:11**********************************@microsof t.com...
I'm writing a web application that fetches documents from the server and
sends them to the client. I do this using the Response.BinaryWrite
method.
However, is there any way to detect the MIME type of a given file? Or a
catch-all MIME type I could use? These files will likely mainly be word
and
pdf documents, but they can conceivably be anything.