|
-
July 15th, 2004, 04:30 PM
#1
Open an XML file in ASP.NET
Seems to be a silly problem but I cannot get it to work. I created an aspx page which is as follows
private void Page_Load(object sender, System.EventArgs e)
{
Response.ContentType = "text/xml";
}
protected override void Render(HtmlTextWriter output)
{
// output.Write("<A>Abc</A>");
}
Up until yesterday this was working fine. Now when I try to open this page, it shows a dialog box asking me to either open or save the file. If I remove the Response.ContentType line then it shows the text "Abc" on the page, but I want to see the content as XML.
Please help.
ASN
-
July 15th, 2004, 04:32 PM
#2
private void Page_Load(object sender, System.EventArgs e)
{
Response.ContentType = "text/xml";
}
protected override void Render(HtmlTextWriter output)
{
output.Write("<A>Abc</A>");
}
The output line is not commented as in the first post.
ASN
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|