Solved

Open New Tab on Browser from child popup window.

Posted on 2016-09-12
3
26 Views
Last Modified: 2016-10-01
I have a popout window which when somone clicks a button it opens a new tab in the parent window

Doing it in the HTML works fine as this.

<a id="btnNewWindow" runat="server" class="btn-primary btn-xs" Height="20px" href="show.aspx" style="text-align: center" target="_blank" visible="false">Open Review in New Tab</a>

Open in new window



but I need to do it in the code behind .  

Below is what I'm currently doing but it redirects the popup window not open a new tab on the parent window.



    Protected Sub btnFullRecord_Click(sender As Object, e As EventArgs)
        Dim TRAINEEID = Session("TRAINEEID")
        Dim POT = Session("POT")
        Response.Redirect([String].Format("candidategeneral.aspx?TraineeID={0}&POT={1}", TRAINEEID, POT))
    End Sub

Open in new window

0
Comment
Question by:edjones1
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
Big Monty earned 500 total points (awarded by participants)
ID: 41794766
you can try something like:

string redirect = "<script>window.open('[String].Format("candidategeneral.aspx?TraineeID={0}&POT={1}", TRAINEEID, POT)');</script>";
Response.Write(redirect);
0
 
LVL 32

Expert Comment

by:Big Monty
ID: 41824629
best solution
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now