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


[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=12hs9i7cf/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124331764/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</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/
 


Reply via email to