Cynthia wrote
Richard,
I tried to work around this issue and now it seems works while I still can't exactlly identify what causes this problem. I don't know if this will work for you or not, anyway, here is how I get it work in my case.
Ops, sorry, It should be
private void Page_Init(Object sender, System.EventArgs e)
{
//Get data from database, put them in a RssChannel class
RssChannel rss = GetChannel();
Response.Clear();
Response.ClearContent();
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.ContentType = "application/xml";
}
//Using XmlTextWriter to output the result
rss.Write(Response.OutputStream);
//End processing of the script
Response.End();
//And extra ResponseEnd() which cuts off the rest of the output text. In my case, it cuts off everything after
Response.End();
Instead of puting the code in Page_Load() event, I move it to the Page_Init() event, and I add an extra Response.End(); in the end.
{
//Get data from database, put them in a RssChannel class
RssChannel rss = GetChannel();
Response.Clear();
Response.ClearContent();
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.ContentType = "application/xml";
//Using XmlTextWriter to output the result
rss.Write(Response.OutputStream);
//End processing of the script
Response.End();
//And extra ResponseEnd() which cuts off the rest of the output text. In my case, it cuts off everything after
Response.End();
}
private void Page_Init(Object sender, System.EventArgs e)