Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, i have a asp.net 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

1 solution

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



Javascript:
JavaScript
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#)

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


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

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900