Need help with TreeView XML DataBind

harrydolphin

New Member
I am using the Web Control TreeView to display a list of items for a certain object. Since it will be different for whatever object the user is viewing I have to dynamically create the treeview, so I have it pointing to a .aspx file which queries the database and formats the XML the correct way. The problem is that I need to pass a variable to the .aspx file, I have been trying to do TreeNodeSrc=http://aspmessageboard.com/archive/index.php/"createxml.aspx?q_number=<%=q_number%>"><BR>But this does not work... I want to stay away from session variables, so any other suggestion would be greatly appreciated.I figured it out, so in case anyone else is interested here is the code I ended up using.<BR><BR><script language="vb" runat="server"><BR>Dim varref as string = "createxml.aspx?d_number=" + Httpcontext.Current.Request.QueryString("d_number")<BR></script> <BR><%treeview1.treeNodesrc = varref%><BR><mytree:treeview id="treeview1" runat="server" DefaultStyle="" HoverStyle="" SelectedStyle="" treeNodeSrc='createxml.aspx' /><BR><BR>I use TreeView Web control also. It works when i use XML file and TreeNodeSrc. Do you know how to save the changes back to XML file when i changed the tree, like adding or removing nodes.<BR><BR>Thanks,<BR>Shelby
 
Back
Top