Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml file won't display unless it has xml extenstion

Status
Not open for further replies.

toptomato

Programmer
Jul 22, 2005
62
0
0
US
hi folks
i am trying to generate RSS (xml output) through asp.net
I perfer the page to have the aspx extention.
The page (rss.aspx) out puts xml by means of:
Response.Write("<<proper rss xml here>>");
Response.End();

however in the browser (both ie and netscape) it doesn't display the out the way xml is supposed to be outputed in a browser.

However, if i do view source and copy everything and paste it in a text file with xml extention it displays in the browser fine.

Any ideas
thanks
 
Try setting the content type:
Code:
Response.ContentType = "text/xml";

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top