Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends

I want open webpage in new new tab in the browser on the button click or link button click

i am user target="_blank" but its not working fine

can any one guide me ??
how can do this task??


regards
Deepak
Posted
Comments
divesh12 17-Jun-11 14:54pm    
Show your all code.
guptaadeepak 22-Jun-11 6:15am    
divesh my problem is sortout

Use

<asp:LinkButton id="lnk" runat="server" onClientClick="javascript:window.open('asas.aspx');" />
 
Share this answer
 
v2
Comments
guptaadeepak 17-Jun-11 8:14am    
thanks
arathi_suresh 17-Jun-11 8:14am    
Pls mark as answered
Monjurul Habib 17-Jun-11 14:40pm    
nice advice, my 5.
 
Share this answer
 
v2
I do it this way:

<asp:Button ID="MyButton" runat="server" Text="Go" PostBackUrl="MyPage.aspx" OnClientClick="window.document.forms[0].target='_blank'; setTimeout(function(){window.document.forms[0].target='';}, 500);" ></asp:Button>
 
Share this answer
 
v2

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