Wrox Programmer Forums
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 16th, 2006, 07:32 AM
Friend of Wrox
Join Date: Oct 2004
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default Download file in HTML format

Hello -

To explain my question I use the following example:

================================================== ==========
<% Response.ContentType = "application/msword" %>

<table width="100%" border="0">
    <td>My Content</td>
================================================== ==========

If you execute the above example it will open a download window and download the file as word document.
However I want to download the file as HTML document. What should be the "Content Type" to download the file as HTML.

Thank you,
Zeeshan Ahmed

Old April 16th, 2006, 08:09 AM
Authorized User
Join Date: Mar 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Raghunathan


You cannot download it as HTML itself. You've got to set the ContentType as "text/html", but the contents will be displayed in the browser only. once it is displayed you can save it as html file that all possible. as far as i know

Old April 28th, 2006, 12:52 AM
Registered User
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts


<% AddHeader "Content-Disposition", "inline; filename= yourfile.html" %>

Don't know if it'll work, but it does with generating HTML out of a database

Similar Threads
Thread Thread Starter Forum Replies Last Post
How HTML understands the file format(according to bhavna General .NET 2 February 5th, 2007 12:43 AM
How HTML understands the file format(according to bhavna General .NET 0 February 2nd, 2007 12:17 AM
Smaller download/single download file available jminatel BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 November 21st, 2005 11:10 AM
plain vs HTML format juergreh Beginning PHP 2 April 19th, 2005 08:42 AM
How to download automatically in HTML? Edward King HTML Code Clinic 1 March 8th, 2004 08:02 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.