I
Irishmaninusa
Hello,
I am a newbie to asp.net and I am trying to do sample code using the
treeview code, and for some reason it is not displaying the way I would
expect it to display. HEre is the code in question
<%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
<%@ Register TagPrefix="IE"
Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls" %>
<script runat="server">
sub TreeView_SelectedIndexChanged(s as object, e as TreeViewSelectEventArgs)
lblSelectedNode.text = treeBooks.GetNodeFromIndex(e.NewNode).Text
end sub
</script>
<html>
<head><title>Test</title></head>
<body>
<form runat="Server">
<IE:TreeView
id="treeBooks"
AutoPostBack="True"
OnSelectedIndexChange="TreeView_SelectedIndexChanged"
Runat="Server">
<TreeNode Text="Home" >
<TreeNode
Text="test" />
<TreeNode
Text="test2" />
</TreeNode>
</IE:TreeView>
<asp:label id="lblSelectedNode" Runat="server" />
</form>
</body>
</html>
I was expecting a tree view to display a node of Home and then subnodes test
and test2, but it doesn't do that, it just displays the items on the screen.
Thanks in advance for any help that is given on this.
I am a newbie to asp.net and I am trying to do sample code using the
treeview code, and for some reason it is not displaying the way I would
expect it to display. HEre is the code in question
<%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
<%@ Register TagPrefix="IE"
Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls" %>
<script runat="server">
sub TreeView_SelectedIndexChanged(s as object, e as TreeViewSelectEventArgs)
lblSelectedNode.text = treeBooks.GetNodeFromIndex(e.NewNode).Text
end sub
</script>
<html>
<head><title>Test</title></head>
<body>
<form runat="Server">
<IE:TreeView
id="treeBooks"
AutoPostBack="True"
OnSelectedIndexChange="TreeView_SelectedIndexChanged"
Runat="Server">
<TreeNode Text="Home" >
<TreeNode
Text="test" />
<TreeNode
Text="test2" />
</TreeNode>
</IE:TreeView>
<asp:label id="lblSelectedNode" Runat="server" />
</form>
</body>
</html>
I was expecting a tree view to display a node of Home and then subnodes test
and test2, but it doesn't do that, it just displays the items on the screen.
Thanks in advance for any help that is given on this.