Solved

ASP.NET Response.Redirect open in new window alternatives

Posted on 2011-09-07
10
1,327 Views
Last Modified: 2012-08-13
I'm redirecting to a new window from code behind and tried this alternative:

Response.Write("<script>");
Response.Write("window.open('www.google.com','_new')");
Response.Write("</script>");

but this is blocked by the popup blocker, which I cannot have as a solution... any other suggestions that bypass the popup blocker?
0
Comment
Question by:conrad2010
10 Comments
 
LVL 9

Accepted Solution

by:
Grant Spiteri earned 125 total points
ID: 36499811
Im curious do you want to navigate elsewhere from your original page or do you want to keep your original page open and also open up another page?
0
 

Author Comment

by:conrad2010
ID: 36499835
@gspiteri:

keep original page open and also open up another page
0
 
LVL 9

Expert Comment

by:Grant Spiteri
ID: 36499886
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:conrad2010
ID: 36499899
@gspiteri:

I like the idea, but a little too much for this problem... would never get the ok to build a webservice for thes (I'm at work here)
0
 
LVL 9

Expert Comment

by:Grant Spiteri
ID: 36499918
really it would take you all of 20 mins to wrap it soz buddy dont know how to do it another way
0
 

Author Comment

by:conrad2010
ID: 36499941
so there is really nothing that would work from code behind that does something like this:

Response.Redirect("http://www.google.com","_new")
0
 
LVL 9

Expert Comment

by:Grant Spiteri
ID: 36499946
not that i know of when it comes to avoiding pop up blockers theres multiple ways to open a new window from code behind but its the pop up blocker thats the pain
0
 
LVL 4

Assisted Solution

by:asp_net2
asp_net2 earned 125 total points
ID: 36500065
Did you try Server.Transfer? Try that as long as you are sending user to another page within your application as this method will NOT work if sending user to page outside your application. See if it gets caught by your popup blocker.
0
 
LVL 16

Assisted Solution

by:disrupt
disrupt earned 125 total points
ID: 36500424
0
 
LVL 15

Assisted Solution

by:navneethegde
navneethegde earned 125 total points
ID: 36500760
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question