Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a LinkButton in my project, and I bind the websites of some colleges dynamically, links are integrated in SQL-Server. When I clicked on the LinkButton I'm getting link in the same page, but I want to display it in separate page or tab. How to do it?
plz Please give me suggesions.
Posted
Updated 18-Jun-16 23:14pm
v2

Use Open method

For example:
ASP.NET
<asp:linkbutton id="myLinkButton" runat="server" onclientclick="window.open('http://www.blahblahblah.com');" ... />


If you want a perfect answer look at:
open method
 
Share this answer
 
v2
Hope this should work.
ASP.NET
<asp:LinkButton OnClientClick="javascript:window.open('http://www.google.com')" ID="linkbtnTest" runat="server" Text ="Visit Google" target="_blank"></asp:LinkButton>

In case if you want to assign the value of OnClientClick from server side please free to do that also.

Thanks.
 
Share this answer
 
v2
Comments
André Kraak 31-Mar-12 8:01am    
Edited solution:
Corrected pre tags

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