Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 08, 2007 04:10 AM by e_screw
Member
6 Points
24 Posts
Mar 08, 2007 03:17 AM|LINK
in the treeview how can I redirect to a separate webpage? For example:
Category 1 Subcategorie1 Subcategorie2
Instead of of going to Service.asp?catId=1 or 2 I would like it to go to page1.aspx, page2.asp...
I would really appreciate your help
All-Star
19530 Points
3894 Posts
Mar 08, 2007 04:10 AM|LINK
Foreach node in the treeview you add, there is a property called NavigateUrl. Set the NavigateUrl of the treeNode to the page you want to navigate
<asp:TreeView ID="TreeView1" runat="server"> <Nodes> <asp:TreeNode Text="Node1" Value="Node1"> <asp:TreeNode NavigateUrl="Page1.aspx" Text="Link1" Value="Link1"></asp:TreeNode> </asp:TreeNode> </Nodes> </asp:TreeView>
Thanks
lpolasek
Member
6 Points
24 Posts
How can I redirect each categorie to a different website?
Mar 08, 2007 03:17 AM|LINK
in the treeview how can I redirect to a separate webpage?
For example:
Category 1
Subcategorie1
Subcategorie2
Instead of of going to Service.asp?catId=1 or 2 I would like it to go to page1.aspx, page2.asp...
I would really appreciate your help
e_screw
All-Star
19530 Points
3894 Posts
Re: How can I redirect each categorie to a different website?
Mar 08, 2007 04:10 AM|LINK
Foreach node in the treeview you add, there is a property called NavigateUrl. Set the NavigateUrl of the treeNode to the page you want to navigate
<asp:TreeView ID="TreeView1" runat="server">
<Nodes>
<asp:TreeNode Text="Node1" Value="Node1">
<asp:TreeNode NavigateUrl="Page1.aspx" Text="Link1" Value="Link1"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
Thanks
Electronic Screw
Website||Blog||Dub@i.net