In the following file below, I want it to return itself as a Rich Text
Format file that populates the variables with data from the database.
I set up the mime types and the filename accordingly.
Now, when I call this page on a Linux system, using the Mozilla browser,
it opens a dialog, asks me whether I want to save it or open it, and if
I open it, opens it as test.rtf, just like I tell it to in the
Content-Disposition header.
However, if I use a MS System with an MSIE browser, I just get an error
that it can't open the page.
Any help on WHY would be appreciated. (And what I can do to get MS
systems to understand.)
[begin page]
<!-- #include file="../assets/includes/datasource.asp" -->
<%
Response.ContentType="application/rtf"
Response.AddHeader "Content-Disposition", "attachment;filename=test.rtf"
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open sDataSource
sqlText = "SELECT id,name,phonenumber FROM tblTest"
set Res = oConn.Execute(sqlText)
%>{\rtf1\ansi\deff0\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Nimbus Roman No9 L;}{\f1\froman\fprq2\fcharset0 Nimbus Roman No9 L;}{\f2\fnil\fprq2\fcharset0 Kochi Mincho;}{\f3\fnil\fprq0\fcharset2 Times New Roman;}{\f4\fnil\fprq2\fcharset0 KacstBook;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blu e128;}
{\stylesheet{\s1{\*\hyphen2\hyphlead2\hyphtrail2\h yphmax0}\rtlch\afs24\lang255\ltrch\dbch\af2\afs24\ langfe255\loch\f0\fs24\lang1033\snext1 Default;}
{\s2\sa283{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax 0}\rtlch\afs24\lang255\ltrch\dbch\af2\afs24\langfe 255\loch\f0\fs24\lang1033\sbasedon1\snext2 Text body;}
}
{\info{\comment StarWriter}{\vern6410}}\deftab1250
{\*\pgdsctbl
{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\margl sxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgd scnxt0 Default;}}
\paperh15840\paperw12240\margl1800\margr1800\margt 1440\margb1440\sectd\sbknone\pgwsxn12240\pghsxn158 40\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn 1440\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aft nrstcont\aftnstart1\aftnnrlc
\pard\plain \s1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlc h\afs24\lang255\ltrch\dbch\af2\afs24\langfe255\loc h\f0\fs24\lang1033\sa283\ltrch\loch\f3\fs20 {\ltrch\loch\f3 <%=Res("name") %> President Pervez Musharraf says government forces believe they have surrounded "a high-valued target" during a new offensive in the tribal region near the Afghan border.}
\par \pard\plain \s2\sa283{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0 }\rtlch\afs24\lang255\ltrch\dbch\af2\afs24\langfe2 55\loch\f0\fs24\lang1033\ltrch\loch\f3\fs20 {\ltrch\loch\f3 Senior Pakistani officials, speaking on condition of anonymity, later told reporters they believe their troops may have cornered al-Qaida's number two leader - Ayman al-Zawahiri. }
\par {\ltrch\loch\f3 Mr. Musharraf said in a pre-recorded interview for CNN Thursday, that a high valued target could be among the militants because of the stiff resistance being put up by those fighting government troops.}
\par {\ltrch\loch\f3 The U.S. Defense Department says it has no information on who the high value target may be.}
\par {\ltrch\loch\f3 The reports of the standoff come as hundreds of Pakistani army troops and paramilitary forces -- backed by helicopter gunships and artillery -- have moved into South Waziristan. }
\par {\ltrch\loch\f3 The new offensive follows fierce battles in the region Tuesday that killed 15 paramilitary troops and 24 gunmen, including several foreign fighters believed to by of Middle East and Chechen origin. Pakistani authorities say they have detained about 18 susp
ects.}
\par {\ltrch\loch\f3 It coincides with a continuing major operation by U.S.-led troops in Afghanistan, aimed at hunting down al-Qaida and Taleban fighters and ultimately finding Osama bin Laden, who is believed to be hiding along the border. }
\par \pard\plain \s1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlc h\afs24\lang255\ltrch\dbch\af2\afs24\langfe255\loc h\f0\fs24\lang1033
\par }
[end page]
--
[ Sugapablo ]
[ http://www.sugapablo.com <--music ]
[ http://www.sugapablo.net <--personal ]
[ su*******@12jabber.com <--jabber IM ]