P
Paolo
Hi to all.
I need to display the content of an Xml document, and I thought that the
most easy way was to use a Xml object.
I was wrong, or more probably I don't understand how to use this control.
That's what I'm trying to do:
in the aspx file I have a TreeView and an Xml object:
<asp:TreeView ID="ConfigTreeView" runat="server"
OnSelectedNodeChanged="ConfigTreeView_SelectedNodeChanged"></asp:TreeView>
<asp:Xml ID="Xml1" runat="server"></asp:Xml>
In the aspx.cs file I wrote:
protected void ConfigTreeView_SelectedNodeChanged(object sender, EventArgs
e)
{
ClearDetail();
string selectedConfig = ConfigTreeView.SelectedNode.Text;
XmlDocument doc = GetConfig(selectedConfig); // Creates an XmlDocument
containing the configuration
if (doc != null) {
Xml1.XPathNavigator = doc.CreateNavigator();
}
}
Unfortunately nothing happens, also if I call the DataBind() method.
Can someone explain (in few words) how to use this class?
Regards,
Paolo.
I need to display the content of an Xml document, and I thought that the
most easy way was to use a Xml object.
I was wrong, or more probably I don't understand how to use this control.
That's what I'm trying to do:
in the aspx file I have a TreeView and an Xml object:
<asp:TreeView ID="ConfigTreeView" runat="server"
OnSelectedNodeChanged="ConfigTreeView_SelectedNodeChanged"></asp:TreeView>
<asp:Xml ID="Xml1" runat="server"></asp:Xml>
In the aspx.cs file I wrote:
protected void ConfigTreeView_SelectedNodeChanged(object sender, EventArgs
e)
{
ClearDetail();
string selectedConfig = ConfigTreeView.SelectedNode.Text;
XmlDocument doc = GetConfig(selectedConfig); // Creates an XmlDocument
containing the configuration
if (doc != null) {
Xml1.XPathNavigator = doc.CreateNavigator();
}
}
Unfortunately nothing happens, also if I call the DataBind() method.
Can someone explain (in few words) how to use this class?
Regards,
Paolo.