开发者

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.


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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜