Click here to Skip to main content
15,909,445 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi everyone :

i am binding a url link to link button .. in front page i want when i click on linkbutton the url should be open in new tab not in new window..
binding process is well. but i am not getting that how should i open a new tab with that url on click of link button.help me out..


ex: if i bind like :https://www.facebook.com/ ..facebook url should be open new tab on click of linkbutton..
thanks in advance
Posted
Comments
sri senthil kumar 18-Mar-13 8:21am    
Link button will get render as html anchor tag. So if you mention attribute target="_blank", might work. Try whether it is working.

1 solution

<asp:LinkButton ID="lnk" runat="server" OnClientClick="window.open('https://www.facebook.com/');">facebook</asp:LinkButton>
 
Share this answer
 
v3

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