解決辦法:寫一個aspx頁面,
在aspx 頁面只留下這一句
復制代碼 代碼如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Data.aspx.cs" Inherits="Data" %>
cs文件如下:
public partial class Data : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
StreamReader sr = new StreamReader(Server.MapPath("") + "\\xml-tree-data.xml");
Response.ContentType = "text/xml; charset=iso-8859-1";
string _temp = sr.ReadToEnd();
sr.Close();
Response.Write(_temp);
Response.End();
}
}
在TreePanel 的loader中指定URL為aspx面就就OK,