There is no way that I know of to determine content type from filename
supported directly by the .NET framework. Instead, you will have to either:
- lookup this information in the registry
- keep your own database of extensions to content type mappings and use this
to determine the content type for a file
HTH,
Kent
"Anony" <(E-Mail Removed)> wrote in message
news:c7svhn$ku5$(E-Mail Removed)...
> Hi All,
>
> In VB6, I got the File Content-Type (image/gif ...) from Windows Registry.
> Is there an easy way now in DotNet (i.e. from file extension)?
>
> Another question: is the IE control (SHDocVw) a WinForm's control now in
> VS2003? I know it wasn't in VS2002, needs InterOp.
>
>
> Thanks and regards,
> Anony
>
>
|