Solved

Open New Tab on Browser from child popup window.

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

830 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