문제

I have a dynamically generated menu (C#), like this:

MenuItem(string text, string value, string imageUrl, string navigateUrl, string target)

MenuItem AdminLevel1 = new MenuItem("Admin", "Admin");
MenuItem AdminPedidosRegisto = new MenuItem("Questions", "AdminQ");

NavigationMenu.Items.Add(new MenuItem("Messages Received", "AdminMessagesR", "", "./Admin/Messages.ascx", "ContainerIframe"));

AdminPedidosRegisto.ChildItems.Add(new MenuItem("Pending", "AdminPending", "", "./Admin/Pedidos.ascx", "ContainerIframe"));`

Where ContainerIframe is the iframe's ID and NavigationMenu is the (asp:Menu)'s ID.

I want to add a breadcrumb to my page, but the menu isn't always the same.

Is there a way?

도움이 되었습니까?

해결책

As I could see you manage your menu items manually, you should do the same for breadcrumb items.

Just create a List breadCrumbItems on your master page and in each page you add the corresponding breadcrumb.

If your menu items are dynamically generated, use the same structure to generate your breadcrumbs.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top