Returning files in my Response : ContentType wanted

  • Thread starter Thread starter Bart Vanwesemael
  • Start date Start date
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
 
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
 
Back
Top