Front-end
<Asp: TreeView ID = "tvObject" runat = "server" performanceid = "xmlObject"
ShowCheckBoxes = "All" ExpandDepth = "1">
<DataBindings>
<Asp: TreeNodeBinding DataMember = "items" TextField = "Name" ValueField = "ID"/> <! -- Bind the attributes of the items node whose ID and Name are items nodes -->
<Asp: TreeNodeBinding DataMember = "item" TextField = "Name" ValueField = "ID"/> <! -- Bind the item node -->
<Asp: treenodebinding datamember = "NOTE" textfield = "name" valuefield = "ID"/> <! -- Bind the note node -->
<Asp: treenodebinding datamember = "root" textfield = "name" valuefield = "ID"/> <! -- Bind the root node -->
</DataBindings>
</Asp: TreeView>
<Asp: XmlDataSource ID = "xmlObject" runat = "server"> </asp: XmlDataSource>
The backend cs code is as follows:
In the page_load event:
If (! IsPostBack)
{
XmlObject. Data = EVE. Service. Model. PublicCode. getXml (); // get xml text
}
The xml format is as follows:
<Root ID = "All" Name = "All options">
<Note ID = "B" Name = "">
<Item ID = "egu" Name = "2">
<Items ID = "B egucc000" Name = "cccccccccccc"/>
</Item>
<Item ID = "eis" Name = "3">
<Items ID = "B egucc000" Name = "cccccccccccc"/>
</Item>
<Item ID = "eit" Name = "4">
<Items ID = "B egucc000" Name = "cccccccccccc"/>
</Item>
<Item ID = "eitc" Name = "5">
<Items ID = "B egucc000" Name = "cccccccccccc"/>
</Item>
<Item ID = "elc" Name = "6">
<Items ID = "B egucc000" Name = "cccccccccccc"/>
</Item>
<Item ID = "emc" Name = "7">
<Items ID = "B egucc000" Name = "cccccccccccc"/>
</Item>
<Item ID = "rtw" Name = "9">
<Items ID = "B egucc000" Name = "cccccccccccc"/>
</Item>
<Item ID = "ttsc" Name = "10">
<Items ID = "B egucc000" name = "cccccccccccc"/>
</Item>
<Item id = "egu" name = "11">
<Items ID = "B eguccnnn" name = "111111111"/>
</Item>
<Item id = "EIS" name = "69">
<Items ID = "B eguccnnn" name = "111111111"/>
</Item>
<Item id = "EIT" name = "89">
<Items ID = "B eguccnnn" name = "111111111"/>
</Item>
<Item id = "EITC" name = "SDF">
<Items ID = "B eguccnnn" name = "111111111"/>
</Item>
<Item ID = "elc" Name = "de">
<Items ID = "B eguccnnn" Name = "111111111"/>
</Item>
<Item ID = "emc" Name = "sdfwef">
<Items ID = "B eguccnnn" Name = "111111111"/>
</Item>
<Item ID = "rtw" Name = "asdfwe">
<Items ID = "B eguccnnn" Name = "111111111"/>
</Item>
<Item ID = "ttsc" Name = "gasdfwe">
<Items ID = "B eguccnnn" Name = "111111111"/>
</Item>
</Note>
<Note ID = "D" Name = "">
<Item ID = "eac" Name = "sdfwef">
<Items ID = "00000" Name = "00000000"/>
</Item>
<Item ID = "eic" Name = "8454">
<Items ID = "00000" Name = "00000000"/>
</Item>
<Item ID = "eiec" Name = "54514">
<Items ID = "00000" Name = "00000000"/>
</Item>
<Item ID = "elh" Name = "8784">
<Items ID = "00000" Name = "00000000"/>
</Item>
<Item ID = "esrc" Name = "63285">
<Items ID = "00000" Name = "00000000"/>
</Item>
</Note>
</Root>
If you are interested, you can try it...