Click here to Skip to main content
16,003,345 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to ask how i get content type in all of files in windows form with vb.net?
if i do in ASP.NET, i can get it by fileupload1.postedfile.contenttype.but i cant do like that in vb.net..

can you help me?
please,i need it..
i appreciate answer from you
thanks very much
Posted

It's impossible to answer your question because, in your example, there is a server running that receives the file.

VB.NET is not a server so it doesn't offer the same functionality. You would have to write your own server that will accept file uploads, but then you also have to write the code to do MIME type lookups to assign a content type to the meta data you're using to track the file in your server.

Google for "vb.net get content type of file extension" and you'll find just how unstable this operation is. It's, basically, a guess at what the content type is.
 
Share this answer
 
thanks very much Dave Kreskowiak :)
it's help me..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900