-2

Can anybody say how to open web page in new tab on link button click? I have tried the below code but in this case when click any link or image button it will open in new tab, but what I need is to open for particular links only... Can anybody help?

<asp:LinkButton ID="lbtn_photo" 
                runat="server" 
                Text="Upload Photo" 
                OnClick="Upload_Photo" 
                OnClientClick="aspnetForm.target='_blank';">
</asp:LinkButton>
slavoo
  • 5,798
  • 64
  • 37
  • 39
user3122272
  • 3
  • 1
  • 6

2 Answers2

0

Check this answer:

http://forums.asp.net/t/1154673.aspx?linkbutton+open+in+a+new+window

Your question is also a duplicate of:

  1. link button property to open in new tab?
  2. How to use a Linkbutton to open into a new tab?

Cheers!

Community
  • 1
  • 1
0
<asp:LinkButton ID="LinkButton1" runat="server" target="_blank">LinkButton</asp:LinkButton