We help IT Professionals succeed at work.
Get Started

How to return a value from a pop up window in asp.net using vb

dyarosh asked
Last Modified: 2012-04-17
I have a website that has a form that allows a user to select a profile from a list.  One of the options is for the user to copy the profile.  I want to open a popup window to prompt for the new profile name and then return to the original window to do the copy.  Here is what I have so far:  (I am using vb.net)


<asp:Button ID="CopyProfileBtn" runat="server" Text="Copy Profile" />


In the PageLoad function:

            'Set Popup Window on CopyProfile Button
            Me.CopyProfileBtn.Attributes.Add("onclick", _
                    "window.open('page2.aspx', '', 'height=300,width=400');return false")


        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

How do I get the value in TextBox1 returned to page1.aspx when page2.aspx is closed?
How do I close page2.aspx?
Watch Question
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE