Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Set TreeNodeSrc to an XML file dynamically ???

Reply
Thread Tools

Set TreeNodeSrc to an XML file dynamically ???

 
 
Guest
Posts: n/a
 
      09-28-2003
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";

}



 
Reply With Quote
 
 
 
 
Tian Min Huang
Guest
Posts: n/a
 
      09-29-2003
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/de...bcontrols/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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Treeview.TreeNodeSrc = "xml formated string" does url-request ThoGen ASP .Net Web Controls 0 04-21-2006 09:14 AM
How to enter a variable in the treenodesrc of a treenode =?Utf-8?B?bWFya2FlbGtpbnNAbmV3c2dyb3Vwcy5ub3NwYW0=?= ASP .Net 3 09-19-2005 01:38 AM
Using string as datasource of TreeNodeSrc on TreeView claireCSHARPuser@hotmail.co.uk ASP .Net 0 06-30-2005 01:02 PM
How to bind an xml string to TreeNodeSrc Donal ASP .Net Web Controls 0 03-06-2004 07:39 PM
Does treeview works in .NET framework 1.1 using TreeNodeSrc to bind an XML file. Thomas ASP .Net Web Controls 1 10-16-2003 06:45 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57