The ASP.net menu displays only specific sites in Web.sitemap

I have several elements besides my web.sitemap file, which relies on querystring or session variables. I do not want these items to appear in my menu.

Is there a way to hide it from the menu, but still be in the Sitemap (to control access to the site).

thank

+3
source share
3 answers

I used this article when I wanted to stop the appearance of node, I found this article wonderful:

http://runtingsproper.blogspot.com/2009/11/i-bet-you-didn-know-that-adding-custom.html

ASP.NET , , , /.

+1

...

siteMapNode, "[hidden]". .cs , ...

protected void rmMenu_ItemDataBound(object sender, RadMenuEventArgs e)
{
    if (e.Item.Text == "[hidden]")
    e.Item.Remove();
}
+1

I believe that you are using the show = "false" attribute , for example:

<siteMapNode show="false" url="~/admin/submissionsaddedit.aspx" title="Add/Edit Submission"  description="" roles="Administrator, Shortlister, Moderator"/>
0
source

Source: https://habr.com/ru/post/1746955/


All Articles