Solved

Open New Tab on Browser from child popup window.

Posted on 2016-09-12
3
52 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
[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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…

734 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