Xml class

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top