Is there any way to get Internet explorer to treat a text/plain .net
page as plain text using asp.net? It seems like IE doesn't trust
text/plain as a mime type, and so it (ironically) displays it as
text/html. (This works fine in Mozilla, though.)
I thought maybe IE would use the file extension as a guide, but it
doesn't seem to work. I tried mapping the .txt extension in IIS so it
is parsed by the .net framework, then setting up an HttpModule to map
calls to http://.../MyApp/Test.txt to Test.aspx. The mapping works
fine, but it still displays my plain text as HTML.
Is there another way to generate a plain text page for IE in asp.net?
Thanks,
-Mike 2 1771
Hi Mike,
use , Response.Conten tType="text/plain"; in your code..
HTH
Regards,
Marshal Antony
..NET Developer http://www.dotnetmarshal.com
"Mike Bridge" <mi**@bridgecan ada.com> wrote in message
news:8r******** *************** *********@4ax.c om... Is there any way to get Internet explorer to treat a text/plain .net page as plain text using asp.net? It seems like IE doesn't trust text/plain as a mime type, and so it (ironically) displays it as text/html. (This works fine in Mozilla, though.)
I thought maybe IE would use the file extension as a guide, but it doesn't seem to work. I tried mapping the .txt extension in IIS so it is parsed by the .net framework, then setting up an HttpModule to map calls to http://.../MyApp/Test.txt to Test.aspx. The mapping works fine, but it still displays my plain text as HTML.
Is there another way to generate a plain text page for IE in asp.net?
Thanks,
-Mike
Hi-
Unfortunately, setting the ContentType to text/plain doesn't doesn't
have any effect---it still displays as "text/html". Internet Explorer
designates that all documents with "text/plain" content-types are
"ambiguous" and so it applies some other tests to try to guess what it
is: http://msdn.microsoft.com/library/de...appendix_a.asp
As far as I can tell, when you designate your page as plain text, the
only thing you can be sure of is that it will not be rendered in IE as
plain text.
-Mike
On Fri, 20 Feb 2004 01:12:01 -0600, "Marshal Antony"
<do***********@ yahoo.com> wrote: Hi Mike, use , Response.Conten tType="text/plain"; in your code.. HTH Regards, Marshal Antony .NET Developer http://www.dotnetmarshal.com
"Mike Bridge" <mi**@bridgecan ada.com> wrote in message news:8r******* *************** **********@4ax. com... Is there any way to get Internet explorer to treat a text/plain .net page as plain text using asp.net? It seems like IE doesn't trust text/plain as a mime type, and so it (ironically) displays it as text/html. (This works fine in Mozilla, though.)
I thought maybe IE would use the file extension as a guide, but it doesn't seem to work. I tried mapping the .txt extension in IIS so it is parsed by the .net framework, then setting up an HttpModule to map calls to http://.../MyApp/Test.txt to Test.aspx. The mapping works fine, but it still displays my plain text as HTML.
Is there another way to generate a plain text page for IE in asp.net?
Thanks,
-Mike This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Xiao Tencas |
last post by:
When trying to load a png image in GD, I get the error (Mozilla Firefox)
"cannot display image, because it contains errors"; IE just shows an empty
'image-error' box.
When loading a large enough image, it does build up the image
gradually until it's almost finished, but then the partly visible image
is replaced by the error message/error box...
|
by: Yuval |
last post by:
Hi,
I'm pulling data into ASP from Sybase IQ. When the data is in the
database its displayed correctley: //C://.... When I pull it into an
asp page, the formating changes, and a few of my slashes disappear. Is
there a special method of pulling slahes into asp?
Thanks,
Yuval
|
by: Eric Lindsay |
last post by:
I can't figure how to best display little snippets of shell script using
<pre>. I just got around to organising to bulk validate some of my web
pages, and one of the problems occurs with Bash shell pieces like this:
<pre><code>
#!/bin/sh
ftp -i -n ftp.server.com< <EOF
user username password
epsv4
cd /
|
by: chris_fieldhouse |
last post by:
Hi,
I'm almost done with a php driven email filter and automated forwarder,
I've tested it out with various emails and ironed out plain text and
html.
But this final item has me stumped.
When processing an email which contains UTF8 encoded characters, I
can't work out how to detect the presence of the UTF8 characters, so I
get =E2=80=99...
|
by: korund |
last post by:
How to make javascript alert with non-english text displaying correctly
on computers where english only is default system & language settings?
For web page the solution is just use meta tags:
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1251">
Will this work for javascript alerts also?
| |
by: hatsumoto |
last post by:
Hello,
I create an ActiveXObject("Msxml2.XMLHTTP") from my HTML page to submit
(i.e. post) XML to a server.
I can see the content of the XML response via javascript
alert(xmlhttp.responseText).
Is there a way to display the content of xmlhttp.responseText on a new
page??
I tried document.write(xmlhttp.responseText) but this does not...
|
by: Karl Groves |
last post by:
I'm trying to work out a mail system which can send an attachment as well
as an HTML formatted message (and a default plain text version).
I found some pretty good code on PHP.net and modified it a little but I
can't seem to get it to work.
It attaches the file properly, but only displays the Plain Text message,
even in an HTML-capable...
|
by: chike_oji |
last post by:
Hello,
I am displaying data retrieved from a database as a httpresponse in a
webform.
I noticed that some characters such as the comma (,), display as
special characters in the
web browser (Internet Explorer). It displays something like $^^%
instead of a comma.
Please how can I have the browser display the comma as it is from the...
|
by: littlealex |
last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS!
In IE6 the text for the following page doesn't display properly - rather than being aligned to the top, along with the slideshow and link buttons, you have to scroll down to see the text - how can I make IE6 display correctly?
...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |