473,397 Members | 1,960 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,397 software developers and data experts.

contenttype rtf question

Hi,
I am able to display my document with contenttype="applicaton/msword"
this requires that the content be marked up in html style..

i wanted to also try displaying it as RTF, so i could use \rtf1 \par
style formatting in it.

however when i do
contenttype applicaton/rtf
and attempt to insert rtf markup, the browser/ word does not recognize
it as valid RT and makes me choose different format.

Nov 19 '05 #1
1 1916
here is my code:

Response.AddHeader("Content-Disposition",
"inline;filename=InvoiceContent.doc");
Response.ContentType = "application/rtf";

content.Append( @"\rtf1" );
content.Append( @"\ansi
\deff4\deflang1033{\fonttbl{\f4\froman\fcharset0\f prq2 Baskerville
MT;}}{\colortbl;\red0\green0\blue0;\red0\green0\bl ue255;\red0\green255\blue255;\red0\green255\blue0; \red255\green0\blue255;\red255\green0\blue0;
" );
....

Nov 19 '05 #2

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

Similar topics

1
by: Jerry O | last post by:
Hi , I have my asp successfully creating excel file viewable through IE using the header: Response.ContentType = "application/vnd.ms-excel" If the user does not have excel installed they...
8
by: Bryan Glennon | last post by:
I have an aspx page. If I set the Response.ContentType = "application/voicexml+xml" then when I load browse to the page it downloads the file and opens .Net Studio to allow me to edit it. It...
3
by: darrel | last post by:
I'm creating a tool for people to upload an image and have it resized on the server. I'm checking to first see if the image is a JPG, GIF, BMP or TIF file. I'm having a problem with the TIF files,...
7
by: darrel | last post by:
I'm creating a file upload tool, and want to allow only DOC, XLS, PDF, RTF or TXT files. I am using this to check: if (contentType = "application/msword") _ or (contentType = "application/rtf")...
2
by: steve02a | last post by:
I'm using the Response.ContentType = "application/vnd.ms-excel" in my web application to export data into a spreadsheet. That works fine and all. My question is: When I export the data and go...
4
by: Mike Kansky | last post by:
I have an image.aspx that does the following: if request("s")=1 then response.redirect(http://www.domain.com/image1.gif) else response.redirect(http://www.domain.com/image2.gif) end if And...
3
by: ad | last post by:
I create a MemoryStream form a dataset: MemoryStream sm= new MemoryStream(); dsHealth.WriteXml(sm); I use Response.Write() to send this XML MemoryStream as file to client. What is the...
8
by: Katie | last post by:
Hi, I am trying to set the content type and header for the response object but for some reason it doesnt set it. I tried it on dev and it worked fine but didnot on production. The difference is...
1
by: gts | last post by:
Hello, I'm putting together a page with some links to videos. One link plays the video and the other is supposed to allow the user to download the file by forcing the "save as" box. For the download...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.