Amanda is right; this is exactly what I do for pages I don't want on the menu, but that I want to appear in my siteMapPath. I first add a custom attribute to my siteMapnode:
<siteMapNode title="foo" url="foo.aspx" showInMenu="false" />
You can add any custom attribute you like; in this case I've used 'showInMenu'. Next I handle the MenuItemDataBound event for the menu control, where I check for the attribute and if it is set to false, I remove the node from the menu:
protected void Menu2_MenuItemDataBound(object sender, MenuEventArgs e)
{
SiteMapNode node = e.Item.DataItem as SiteMapNode;
// check for the showInMenu attribute and if false
// remove the node from the parent
// this allows nodes to appear in the SiteMapPath but not show on the menu
if (!string.IsNullOrEmpty(node["showInMenu"]))
{
bool isVisible;
if (bool.TryParse(node["showInMenu"], out isVisible))
{
if (!isVisible)
{
e.Item.Parent.ChildItems.Remove(e.Item);
}
}
}
}
Let me know if you need this in VB.
Dave