why does Response.ContentType = "text/plain"; not work correctly?

G

Guest

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs"
Inherits="Default2" %>

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "text/plain";
Response.Write("help");
}
}

Invalid at the top level of the document. Error processing resource
'http://localhost/aplus/Default2.aspx'. Line 1, Positi...

help
 
G

Guest

Letuce,
this inline script page works fine for me:


<%@ Page Language="C#" %>
<script runat=server>
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "text/plain";
Response.Write("help");
}
</script>

--Peter
 
G

Guest

letuce said:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs"
Inherits="Default2" %>

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "text/plain";
Response.Write("help");
}
}

Invalid at the top level of the document. Error processing resource
'http://localhost/aplus/Default2.aspx'. Line 1, Positi...

help

When and where do you get the error message?
 
G

Guest

I have 2 machines imaged exactly the same and one works just fine and the
other does not.

I have several other people at my location and it's about 50-50 works doen't
work with them as well.

it's got to be some type of IE specific security/mime setting.

why would the mime type think text/plain is xml? strange?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top