ASP.NET newbie here. When on a page I\'d like to set the corresponding menu item to selected. My approach is this: On Home.aspx.cs:
Menu menu = (Menu)Master.
If your web.sitemap file contains external links (links to other domains), then those links will need to start with http:// or https://, but your local file references would not - they would just be relative references from the current location of the loaded document.
As such, there's no need to pad your URL's with extra characters, when the characters you need are already there (http or https).
protected void mnuFooter_MenuItemDataBound(Object sender, MenuEventArgs e)
{
string theURL = e.Item.NavigateUrl;
if (theURL.Contains("http://") || theURL.Contains("https://"))
{
e.Item.Target = "_blank";
}
}
If you have a local file that you want opened in a new window, just change the URL from a local reference to the full URL (it will take that file slightly longer to load because the URL will have to resolve).