Returning files in my Response : ContentType wanted

B

Bart Vanwesemael

Hi,

I return a file to the client browser by using Response.WriteFile

Now, there can be multiple type of files, and I need to specify the
contenttype.

Is there a way of getting this out the file itself, or am I stuck with
determinating it from the file extention?


Bart
 
W

William F. Robertson, Jr.

The lazy way I usually do it, is to set the content type to
application/octet-stream. And let the user machine decide how to open it.

HTH,

bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top