473,407 Members | 2,359 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,407 software developers and data experts.

returning xml from aspx page

why doesn't IE6 show the response from this page as XML? is the contenttype
wrong?

Basically, i've got an "empty" aspx page (barring the precompiler line <%@
Page language="c#" Codebehind="newssvc.aspx.cs" AutoEventWireup="false"
Inherits="gorlandnet.news.newssvc" %>)

then this in the Page_Load method:

Response.ContentType="text/xml";
Response.ContentEncoding = System.Text.Encoding.UTF8;

Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
Response.Write("<xmldata>");
Response.Write("<newsitem>");
Response.Write("<title>News item</title>");
Response.Write("</newsitem>");
Response.Write("</xmldata>");
Response.End();

what am i doing wrong?

tia

sam martin

Nov 15 '05 #1
1 1780
wts the error you are getting?
It works fine for me.

"sam martin" <sa*********@yahoo.co.uk> wrote in message news:ut**************@TK2MSFTNGP09.phx.gbl...
why doesn't IE6 show the response from this page as XML? is the contenttype
wrong?

Basically, i've got an "empty" aspx page (barring the precompiler line <%@
Page language="c#" Codebehind="newssvc.aspx.cs" AutoEventWireup="false"
Inherits="gorlandnet.news.newssvc" %>)

then this in the Page_Load method:

Response.ContentType="text/xml";
Response.ContentEncoding = System.Text.Encoding.UTF8;

Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
Response.Write("<xmldata>");
Response.Write("<newsitem>");
Response.Write("<title>News item</title>");
Response.Write("</newsitem>");
Response.Write("</xmldata>");
Response.End();

what am i doing wrong?

tia

sam martin


Nov 15 '05 #2

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

Similar topics

1
by: Deidre | last post by:
I am having a weird problem. I have an application thats default.aspx page is a menu page when a menu item is selected the requested page is loaded into default.aspx using iframes. When unsaved...
0
by: sam martin | last post by:
why doesn't IE6 show the response from this page as XML? is the contenttype wrong? Basically, i've got an "empty" aspx page (barring the precompiler line <%@ Page language="c#"...
0
by: GFro | last post by:
I have a calendar page that returns a date to a textbox on the parent page. It is returning the wrong format on the deployment server. On the development server the calendar returns to textbox in...
3
by: Tim::.. | last post by:
Can someone please help... I'm kind of new to asp.net and VS.net and need to know how to get the value of a variable in the following funtion into a sub on another aspx page! Can someone please...
3
by: David Thielen | last post by:
Hello; When I get a request for a page, how can I return a pdf as the page contents? In java the way to do this is for the response set it's type to "application/pdf" and then get a byte (not...
5
by: Diego Mijelshon | last post by:
I've been debugging an issue we have in an asp.net 2.0 application for several days. The initial report of the bug was that, after waiting for some minutes with an open page, entering a number...
1
by: Curious Trigger | last post by:
Hi there, programming with Visual Studio 2005 and ASP.NET 2.0 I want to open a modal dialog from Default.aspx. I searched the net and many newsgroups but I couldn't find any solution. First I...
4
by: Landes | last post by:
Hiya, I have the following code in a C# aspx page, but I keep getting the error that 'ExceptionCategoryId_' not found. Looks like the QueryString is not returning anything. <asp:DataGrid...
1
by: CoreNeter | last post by:
I have an aspx page which contains some HTML and an aspx.cs which contains some C# code. In the aspx.cs file I have a string(of XML data) which I would like to send to the browser. Response.Write...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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
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...
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,...

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.