473,395 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Returning files in my Response : ContentType wanted

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
Nov 17 '05 #1
1 3189
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

"Bart Vanwesemael" <bv*@ezos.com> wrote in message
news:uT**************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael | last post by:
Hello, I'm looking for a way to allow a client who clicks on a link the ability to "adodb.stream" a multimedia file (mainly audio/wav) files, but the file they would be accessing is outside the...
2
by: sam martin | last post by:
why doesn't IE6 show the response from this page as XML? is the contenttype wrong? Basically, i've got an "empty" aspx page (barring the precompiler line <%@ Page language="c#"...
10
by: KeithRaginF | last post by:
Hello I am trying to return the contents of an Excel file. However, I don't want to just redirect the request to the Excel file since it does not reside in a location where that is appropriate. ...
3
by: David Thielen | last post by:
Hello; When I get a request for a page, how can I return a pdf as the page contents? In java the way to do this is for the response set it's type to "application/pdf" and then get a byte (not...
6
by: Julien | last post by:
Hello, I have some files located in a file server and managed by a SQL database from a web based interface using ASP + VBSCRIPT technology. I need to automatically copy those files to a web...
6
by: zerbie45 | last post by:
Hi all, I need to know if, and how, it is possible to use ASP to download a file automatically from the web server to the client in a given path. Is that possible ? Ideally I want a page with a...
7
by: eventuranza | last post by:
For my application, there users can upload and download files to the a webserver. Straightforward enough. However, when they upload a PDF file then try to download it, the file seems to be...
23
by: Peter | last post by:
I have a problem with a page show_image.asp that returns a jpg image under Windows XP Pro SP2. The page sets content type as: Response.ContentType = "image/jpg" While this works perfectly fine...
10
by: =?Utf-8?B?SnVhbg==?= | last post by:
Hi! I want to use ASP to download big files using ADODB.STREAM. It works very fine with files smaller than 80 MB. On the Webserver I can see that memory allocation and the process w3wp is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.