日期:2014-05-16 浏览次数:21453 次
<asp:Xml ID="Xml1" runat="server"
TransformSource="~/xml/book1.xslt" DocumentSource="xml/book1.xml"></asp:Xml>
<asp:Xml ID="Xml1" runat="server"
TransformSource="~/xml/book1.xslt" ></asp:Xml>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
XmlDocument xml = new XmlDocument();
xml.Load("~/xml/book1.xml");
Xml1.DocumentContent = xml.OuterXml;
}
}
xml.Load("~/xml/book1.xml");
//改为绝对路径。如:
xml.Load(Server.Mappath("~/xml/book1.xml"));