Click here to Skip to main content
12,827,242 members (42,247 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi, i have a page say A which has a iframe and this iframe is opens page B with popup extender, page B also have a iframe and opens C with popupextender.
how can i close iframe B from C?
Posted 10-Dec-12 3:23am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

well, I got the solution.
what I did is so much simple, I used javascript to read values from control inside the IFRAME, saved them in a hidden filed, then from code behind file, I get them from hidden field and set them to their relative place.

this is what I used

var IFrame = document.getElementById("IFrameIDHere");
var Values = "";

Values += IFrame.contentDocument.getElementById("control_1").value + ","; 
Values += IFrame.contentDocument.getElementById("control_2").value + ","; 
Values += IFrame.contentDocument.getElementById("control_3").value + ","; 
Values += IFrame.contentDocument.getElementById("control_n").value + ","; 

document.getElementById("HiddenFieldID").value = Value; 

after that, I did this from code behind file. (C#)

string[] Values = HiddenFieldID.Text.ToString().Split(',');

now, I used values from this array and did my task..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 13 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100