TreeView programming

Adicto69

New Member
so I got this treeview now\[code\]<asp:TreeView ID="TreeView2" runat="server" ImageSet="WindowsHelp" Width="16px"> <ParentNodeStyle Font-Bold="False" /> <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" /> <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px" VerticalPadding="0px" /> <Nodes> <asp:TreeNode Text="Master Files" Value="http://stackoverflow.com/questions/14554404/New Node"> <asp:TreeNode Text="Additives Master" Value="http://stackoverflow.com/questions/14554404/New Node"></asp:TreeNode> <asp:TreeNode Text="Additive Composition Master" Value="http://stackoverflow.com/questions/14554404/New Node"> </asp:TreeNode> <asp:TreeNode Text="Products Master" Value="http://stackoverflow.com/questions/14554404/New Node"></asp:TreeNode> <asp:TreeNode Text="Tanks Master" Value="http://stackoverflow.com/questions/14554404/New Node"></asp:TreeNode> <asp:TreeNode Text="Trucks Master" Value="http://stackoverflow.com/questions/14554404/Trucks Master"></asp:TreeNode> <asp:TreeNode Text="Track Code Master" Value="http://stackoverflow.com/questions/14554404/Track Code Master"></asp:TreeNode> </asp:TreeNode> <asp:TreeNode Text="Security" Value="http://stackoverflow.com/questions/14554404/Security"> <asp:TreeNode Text="TAS User Management" Value="http://stackoverflow.com/questions/14554404/TAS User Management"> </asp:TreeNode> <asp:TreeNode Text="Change Own Password" Value="http://stackoverflow.com/questions/14554404/Change Own Password"> </asp:TreeNode> </asp:TreeNode> <asp:TreeNode Text="Alarms" Value="http://stackoverflow.com/questions/14554404/Alarms"></asp:TreeNode> <asp:TreeNode Text="Seals" Value="http://stackoverflow.com/questions/14554404/Seals"></asp:TreeNode> <asp:TreeNode Text="Loading Management" Value="http://stackoverflow.com/questions/14554404/Loading Management"> </asp:TreeNode> <asp:TreeNode Text="Order Management" Value="http://stackoverflow.com/questions/14554404/Order Management"></asp:TreeNode> <asp:TreeNode Text="Opening/Closing" Value="http://stackoverflow.com/questions/14554404/Opening/Closing"></asp:TreeNode> <asp:TreeNode Text="Weight Bridge" Value="http://stackoverflow.com/questions/14554404/Weight Bridge"></asp:TreeNode> <asp:TreeNode Text="AuditTrails" Value="http://stackoverflow.com/questions/14554404/AuditTrails"></asp:TreeNode> </Nodes> <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="1px" /> </asp:TreeView>\[/code\]I want 2 functions, authorize permission and deny permission using a checkbox, which means now I'm in my administrator webpage. I can authorize/deny permission to view the treeview nodes to different rolesCurrently I have 3 roles, Administrator, User and Guest.I would like the user to only see Master Files and Security tree nodes , how would i able to do it ?
 
Back
Top