0

When user clicks hyperlink on my ASP.NET page, I want a new browser to open.

I added from toolbox a hyperlink to my target .html file, and added to Sub Page_Load

<hyperlink ID>.Attributes.Add("target","_blank") 

But it adds a new tab to browser instead of opening a new browser window.

I tried putting '_blank' into 'Target' attribute of hyperlink property, but still fails.

Weirdly, it works and opens new browser when I run it from VisualStudio, but it only opens new tab if I browse to my web site.

Nalaka526
  • 11,278
  • 21
  • 82
  • 116
Doug Null
  • 7,989
  • 15
  • 69
  • 148

1 Answers1

1

I don't think there is any way to control how the new window opens. It could be new window or tab based on user's browsers settings.

JavaScript open in a new window, not tab

Community
  • 1
  • 1
bdoshi
  • 1,051
  • 12
  • 19