I am implementing a Dashboard kind of web application, where users having different Roles. I have to show Site Map Path at the top pf the page, as user browse the different pages inside the dashboard. I am using asp.net SiteMapPath, how can i use it for Multiple root node. i need to implement multiple root node as per users roles.
Ex:- Admin->Directory1->Directory2->Page1.aspx
Teacher->Directory1->Page2.aspx
Student->Directory2->Page1.aspx and so on.
Where Admin, Teacher, and Student are root node of the path.
It shouldn't be like Admin->Teacher->Directory1->Page2.aspx
Any solution?
Thanks.
three site Map file (For Admin, Teacher, Student) We've placed these sitemap files into the App_Data folder, In the user control, we create a public enum, to represent the different menus available.
Now, The GetMenuDataSource method reads the required sitemap file as an XML file, then creates and returns a data source that can be bound to the control.
as the data source is now XML, and not in the format returned from the sitemap provider, we need to setup our databindings on the menu control itself.
We can now finally bind the source to the control, and this is all fired off in the Page_Load event handler of the User Control.
Using our new menu is now as easy as registering the user control on the page, and specifying which menu to display by setting the MenuToLoad property.
Now, You can use different different site map for different different users.....