Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 6th, 2007, 12:02 PM
Authorized User
 
Join Date: Feb 2007
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Default Reload Parent form from Child form

Hi,
      I have hyperlinkfield column in gridview. I am using following code in parent form to open new form ( similar like window.open).

<asp:HyperLinkField HeaderText=" Comments" DataNavigateUrlFields="rate_id,rateComments,countr y_name,country_iso_code" Text = '...' DataNavigateUrlFormatString="ratecomments.aspx?rID ={0}&amp;rComm={1}&amp;rCtry={2}&amp;rCtryID={3}" Target="_search" >
</asp:HyperLinkField>

             I need to pass few parameters from current row when user click hyperlink to open new form also as you can see in code.Now in New form i have submit button. I want, when user click on submit it performs update in DB and close new form and reload gridview with updated data.
            I unbale to use java script in parent form as i need to pass server side variables .Any one have idea how i can reload parent page. In new form i have written following code on submit at the end

Response.Write("<script language='javascript'>{window.opener.location.relo ad();self.close();}</script>");

 
Old February 6th, 2007, 12:33 PM
Authorized User
 
Join Date: Jun 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

     function Reload() {
       opener.location.href=opener.location.href;
       opener.focus();
       self.close();
     }

Hope it works.


Rams
 
Old February 6th, 2007, 12:53 PM
Authorized User
 
Join Date: Feb 2007
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank you very much.Works great...






Similar Threads
Thread Thread Starter Forum Replies Last Post
Posting asp form variables from child to parent aspless Javascript How-To 0 July 20th, 2007 10:36 AM
Submitting a parent form from a child window in IE livehed Other Programming Languages 0 February 15th, 2007 01:07 PM
Reference to parent form from child prashantha Visual Basic 2005 Basics 2 November 15th, 2006 03:54 PM
parent form from child form - urgent plz netfresher C# 1 November 8th, 2006 06:59 PM
parent child form data passing maddy137 ASP.NET 1.0 and 1.1 Basics 0 April 26th, 2006 01:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.