Dr. Rajesh Rolen
Dr. Rajesh Rolen

Reputation: 14285

Open same page through multiple Menu Item in asp.net using sitemap

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.

Upvotes: 1

Views: 1446

Answers (3)

Mike Robertson
Mike Robertson

Reputation: 90

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

Upvotes: 1

Middletone
Middletone

Reputation: 4270

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.

Upvotes: 0

Rebecca
Rebecca

Reputation: 14402

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.

Upvotes: 0

Related Questions