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
dyarosh asked
on
368 Views
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)

page1.aspx

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

page1.aspx.vb

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")

page2.aspx

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


How do I get the value in TextBox1 returned to page1.aspx when page2.aspx is closed?
How do I close page2.aspx?
Comment
Watch Question
Commented:
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