Solved

Open New Tab on Browser from child popup window.

Posted on 2016-09-12
3
57 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:Ed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 33

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 33

Expert Comment

by:Big Monty
ID: 41824629
best solution
0

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

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

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Suggested Courses

632 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