No,
1) I have some files with different MIME types in the server. (doc, jpg, txt,
xls, and so on)
2) I have an hyperlink control in a page pointing to an aspx page with the
following snippet code:
Response.Clear();
Response.ContentType = "application/x-www-form-urlencoded"; // HERE IS MY
PROBLEM
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + fileName
+ "\"");
Response.Flush();
Response.WriteFile(path + fileName);
2) when the user click the hyperlink, the file must be opened with the
apropriate software without asking to save the file.
3) So, I must know the content type of the file I wanna open to not show the
save browser's dialog box.
That's all !!!
Fábio
----- Original Message -----
From: Bob Filipiak
To: [email protected]
Sent: Tuesday, August 16, 2005 1:55 PM
Subject: Re: [AspNetAnyQuestionIsOk] ContentType
I may be wrong but I think this individual wants to access the client PC's
file system, which you can't do from the server.
----- Original Message -----
From: "Ryan Olshan" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, August 16, 2005 12:17 PM
Subject: Re: [AspNetAnyQuestionIsOk] ContentType
How about Response.AppendHeader("Content-Disposition", Content Type)?
Ryan
On 8/16/05, Fábio Akira Yoshida <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> how can I get the ContentType of a file returned by a stream
> of a page without using an upload control?
>
> I need to open a file in a client browser without asking to save the file.
>
> Fabio
>
>
>
> ------------------------------
> YAHOO! GROUPS LINKS
>
>
> - Visit your group
> "AspNetAnyQuestionIsOk<http://groups.yahoo.com/group/AspNetAnyQuestionIsOk>"
> on the web.
> - To unsubscribe from this group, send an email to:
>
> [EMAIL PROTECTED]<[EMAIL PROTECTED]>
> - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------
>
--
Thank you,
Ryan Olshan
<asp:Web Programmer, Owner />
TeraNet Systems
http://www.teranetsystems.com
--------Internet E-Mail Confidentiality Statement--------
The content of and attachment(s) to this electronic transmission contains
information from TeraNet Systems and is intended for the use of the person,
firm or entity to which it is directed herein, and may contain information
that is private, confidential, exempt from disclosure under applicable law,
and/or proprietary to TeraNet Systems and is protected by law. If you are
not the intended recipient, or the employee or agent responsible for
delivering this message to the intended recipient, any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this message in error, please notify the sender,
[EMAIL PROTECTED], immediately by reply e-mail and delete the original
message and any attachment(s) without reading or saving in any matter. Thank
you for your cooperation.
[Non-text portions of this message have been removed]
Yahoo! Groups Links
SPONSORED LINKS Programming languages C programming language Computer
programming languages
Java programming language C programming language History of computer
programming language
------------------------------------------------------------------------------
YAHOO! GROUPS LINKS
a.. Visit your group "AspNetAnyQuestionIsOk" on the web.
b.. To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
------------------------------------------------------------------------------
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hjpgojq/M=362131.6882499.7825260.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124246590/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/