I need to output XML / ASX on an ASPX page. The XML is generated from the code behind and will look like this.
I'm using string builder to create the XML / ASX.
(...)
sb.AppendLine("<asx version='3.0'>");
sb.AppendLine("<title> Spilliste </title>");
while (i < pdc.Count)
{
sb.AppendLine("<entry>");
sb.AppendLine("<title>" + pdc[i].PageName + "</title>");
sb.AppendLine("<abstract> Ikke tilgjengelig</abstract>");
sb.AppendLine("<ref>" + pdc[i].LinkURL + "</ref>");
sb.AppendLine("</entry>");
i++;
}
sb.AppendLine("</asx>");
return sb.ToString();
(...)
But how can I output this?
Response.Write
does not work from code behind. And I'm notable to use <asp:label>
in the ASPX file, because it needs to be placed within tags. I basically have a blank ASPX page.
What to do?