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 April 10th, 2007, 06:39 AM
Authorized User
 
Join Date: Jun 2006
Posts: 47
Thanks: 0
Thanked 2 Times in 2 Posts
Default Urgent - pass value from child to parent

hi all,
again stuck somewhere.
i m using master pages, in one of my form i have to open a new child window.
now from that child window i want to pass some value to parent window but m not getting the control of parent form ( i think due to maste page) .
I have tried even client id but no result pl. help me....

Thanks in advance.

__________________
Komila Kalia
Software Developer
Reliance engineering Associates (P) Ltd.
 
Old April 10th, 2007, 08:04 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Unlike in a windows forms app, a web application doesn't have a "parent" or "child" window concept. At least not from the perspective of the server. You have to deal with this relationship from the client-side perspective.

A window opened with javascript should have the "window.opener" property which will refer to the browser window that opened it. But remember, this is only on the client side of things. Using "window.opener" you could then reference a control in the opener window (parent) and assign it a value.

Master pages has no affect on this behavior.

-Peter
 
Old April 18th, 2007, 04:55 AM
Authorized User
 
Join Date: Jun 2006
Posts: 47
Thanks: 0
Thanked 2 Times in 2 Posts
Default

hi and thanks planoie
thanks for making me clear abt the child parent concept.
but master page have some effect as after the window.opener we have to mention the form name and in master page i do not have form name.

although i have done with this problem , and with master pages i have to write
window.opener.aspnetForm.submit();

and my parent window get sumbitted.

thanks again.

 
Old April 18th, 2007, 06:33 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

An ASP.NET webform will always have only 1 form... therefore you should be able to do this:

window.opener.forms[0].submit();

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
parent child connect s2mo SQL Server 2005 1 February 20th, 2007 07:16 AM
parent form from child form - urgent plz netfresher C# 1 November 8th, 2006 06:59 PM
parent child presentation db96s1 Beginning PHP 0 February 7th, 2006 06:19 PM
Parent - Child Combo babloo81 BOOK: Professional Jakarta Struts 0 April 27th, 2005 01:54 PM





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