Question

I am using SiteMap and Menu in asp.net to create menus on masterpage. i want to open a same page lets say "Under Construction" from multiple menus. but its giving me error that one menu can refer to one page only. please give me solution to implement this.

Was it helpful?

Solution

You can create an xmldoc in memory and bind it to the menu control with the urls that you desire. You could aslo dynamically create the menu in your code behind appending hte items based on some criter that you set either in your DB or in XML.

OTHER TIPS

Although the URL needs to be different for each menu item you can still load the same aspx page from multiple menu items:

siteMapNode title="Page One" description="First page" url="~/Page.aspx?p=1" roles=""

siteMapNode title="Page Two" description="Second page" url="~/Page.aspx?p=2" roles=""

Passing ?= parameters makes the URL different and if your ASPX page ignores the parameter then you achieve the desired effect

All Urls must be unique in the sitemap.

You could create the pages, and load a under construction user control, or alternatively, redirect the user in Page_Load to the under construction page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top