Doug Null
Doug Null

Reputation: 8327

ASP.NET VisualBasic2010 web app hyperlink opens new browser tab instead of new browser window

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.

Upvotes: 0

Views: 538

Answers (1)

bdoshi
bdoshi

Reputation: 1071

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

Upvotes: 1

Related Questions