troubleshooting Question

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

Avatar of dyarosh
dyarosh asked on
ASP.NET
2 Comments1 Solution371 ViewsLast Modified:
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?
ASKER CERTIFIED SOLUTION
nilesh31

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros