PC Review


Reply
Thread Tools Rate Thread

Content-Type from file extension ?

 
 
Anony
Guest
Posts: n/a
 
      12th May 2004
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


 
Reply With Quote
 
 
 
 
Kent Boogaart
Guest
Posts: n/a
 
      12th May 2004
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
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
file type extension mc Windows XP Help 11 23rd Apr 2005 04:30 PM
Shell Extension for any file type Luhar Microsoft VB .NET 1 16th Aug 2004 09:31 PM
How to convert Content-Type to file extension Anony Microsoft Dot NET 2 20th May 2004 09:16 PM
No file type extension Gilbert Windows XP Photos 1 2nd Nov 2003 07:00 AM
changing file type extension Moe Windows XP Basics 0 25th Sep 2003 05:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:24 PM.