【发布时间】:2011-01-18 17:57:37
【问题描述】:
我需要在 ASPX 页面上输出 XML / ASX。 XML 是从后面的代码生成的,将 look like this.
我正在使用字符串生成器来创建 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();
(...)
但是我怎样才能输出这个呢?
Response.Write 在后面的代码中不起作用。我注意到在 ASPX 文件中使用 <asp:label>,因为它需要放在标签中。我基本上有一个空白的 ASPX 页面。
怎么办?
【问题讨论】: