Set TreeNodeSrc to an XML file dynamically ???

G

Guest

Hi,



How can I set the TreeView's TreeNodeSrc property to an XML file
dynamically?:



Below is what I want to do, but it doesn't work:



private void Page_Load(object sender, System.EventArgs e)

{

this.TreeView1.TreeNodeSrc = "TreeView.xml";

}
 
T

Tian Min Huang

Hi,

Thanks for your post. We are able to dynamically set the TREENODESRC
attribute of a TreeNode, after that, please remember to call the databind
method to render the changes. For example:

private void Page_Load(object sender, System.EventArgs e)
{
this.TreeView1.TreeNodeSrc = "TreeView.xml";
this.TreeView1.DataBind();
}

Please refer to MSDN online for detailed information and sample code:
http://msdn.microsoft.com/library/default.asp?url=/workshop/webcontrols/beha
viors/library/treeview/treeNodeSrc.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top