I’m trying on ASP.Net in C# to open a new url in a new tab but I’m always blocked by pop-ups, when I allow pop-ups it’s working, is there a way to open a new tab even if the pop-ups are blocked?
Here is my code:
protected void myFunc() {
// start code
// When doing this it's blocked by pop-ups
ScriptManager.RegisterStartupScript(this, this.GetType(), "OpenNewTab", String.Format("window.open('{0}', '_blank');", url), true);
}
New contributor
michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.