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

dyarosh used Ask the Experts™
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


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


In the PageLoad function:

            'Set Popup Window on CopyProfile Button
            Me.CopyProfileBtn.Attributes.Add("onclick", _
                    "'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

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I would say that your approach is completely wrong.
There is no need of opening a new aspx page just containing a single textbox.
It will cause and unnecessary request to server.

You can just create a div containing textbox and show the div on button click and get the required value from textbox.


Makes sense. I am implementing your approach.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial