I have a menu link that is to pop-open a page in a new tab. I am using IE11 but have many users still on IE9. This is the code that I am using in the web.sitemap:
<siteMapNode url="~/Forms_Admin/Maintenance/AdminUtility.aspx?window=new" title="LookUp Utility" roles="XXXX"></siteMapNode>
If I open in FireFox or Chrome this will open in a new tab, but in IE it just opens in the same window.
How do I get this to open in a new tab?
Thanks
只需在声明中包含target = _blank即可。
<siteMapNode url="~/Forms_Admin/Maintenance/AdminUtility.aspx?window=new" target="_blank" title="LookUp Utility" roles="XXXX"></siteMapNode>
target="_blank"
on the source page was lost when the page rendered for me. I had to do it in the code behind like so:
private void Menu1_PreRender(object sender, EventArgs e)
{
MenuItem adminUtilityItem = new MenuItem("LookUp Utility");
adminUtilityItem.NavigateUrl = "~/Forms_Admin/Maintenance/AdminUtility.aspx?window=new";
adminUtilityItem.Target = "_blank";
Menu1.Items.Add(adminUtilityItem);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.