I have an ASHX handler that returns an XML response (FileStructureXML.ashx).
Now I need to get the XML response from the ASHX handler and use it as a data source for my ASPX page.
If I point the XMLDataSource to a static XML file on the server, the treeview populates as expected. However, if I point the XMLDataSource to the ASHX handler instead of a static XML file on the server, it doesn't work.
Any help would be appreciated.
<body>
<form id="form1" runat="server">
<div>
<asp:TreeView ID="TreeView_Folders" runat="server" DataSourceID="FileXML">
<DataBindings>
<asp:TreeNodeBinding DataMember="Directory" TextField="Name" />
<asp:TreeNodeBinding DataMember="File" TextField="Name" />
</DataBindings>
</asp:TreeView>
</div>
<div>
<asp:XmlDataSource ID="FileXML" runat="server" DataFile="FileStructureXML.ashx">
</asp:XmlDataSource>
</div>
</form>
</body>