Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using web.sitemap where there are multiple links such as


I want to open this link in new tab or window.
Below is the User Interface code:

ASP.NET
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" StartFromCurrentNode="False" StartingNodeUrl="~/default.aspx" />
                <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SiteMapDataSource1" >
                    <HeaderTemplate>
                        <ul>
                    </HeaderTemplate>
                    

                    </ul>


I added target = "_blank" and also javascript code to open a link in new window, but it didn't work. Any help is really appreciated.
Thank you in advance.

What I have tried:

I added target = "_blank" and also javascript code to open a link in new window
Posted
Updated 17-Oct-16 12:14pm

1 solution

Looks like handling MenuItemDataBound event will do the trick for you. See: ASP.Net Menu Control Open in New Window | nate elston[^]
 
Share this answer
 
Comments
Rachna0309 20-Oct-16 10:38am    
That didn't work.
Vincent Maverick Durano 20-Oct-16 11:30am    
what did you tried?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900