GrerSueddom
New Member
I'm taking my first crack at the TreeView Control using the code from the MSDN sample page, and I'm not sure why my data isn't appearing in a tree structure. Rather, each of the nodes appear just as a straight line of text as shown below. I'm not getting any parser error messages. Thanks.<BR><BR>It should work like this:<BR>http://samples.gotdotnet.com/team/webcontrols/treeview/tree.aspx<BR><BR>My code copied directly from MSDN:<BR><BR><%@ import namespace="Microsoft.Web.UI.WebControls" %><BR><%@ register TagPrefix="mytree" <BR>Namespace="Microsoft.Web.UI.WebControls" <BR>Assembly ="Microsoft.Web.UI.WebControls" %><BR><html><BR><head><BR></head><BR><body><BR><form id="myform" runat="server"><BR><mytree:treeview runat="server" ChildType="Folder"><BR><mytree:treenodetype Type="Folder"<BR> ExpandedImageUrl="./images/folderopen.gif"<BR> ImageUrl="./images/folder.gif" /><BR> <mytree:treenode Text="Michigan"><BR> <mytree:treenode Text="Detroit" /><BR> <mytree:treenode Text="Farmington" /><BR> <mytree:treenode Text="Southfield" /><BR> </mytree:treenode><BR> <mytree:treenode Text="Washington" ><BR> <mytree:treenode Text="Bellevue" /><BR> <mytree:treenode Text="Redmond" /><BR> <mytree:treenode Text="Woodinville" /><BR> </mytree:treenode><BR></mytree:treeview><BR></form> <BR></body><BR></html><BR><BR>My results:<BR><BR>Michigan Detroit Farmington Southfield Washington Bellevue Redmond WoodinvilleHi Eric,<BR><BR>I had this same problem when first trying to get the WebControls to work. Basically it confused me for ages - I then uninstalled IIS and .NET and then made sure I installed them in the correct order - then it worked! I think that the basic problem is that the .NET stuff is really picky about the way in which you install components - not very technical I know but it was the only way I got mine to work.<BR><BR>Good Luck<BR><BR>Dan