Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 10-Dec-12 3:23am

1 solution

Rate this: bad
good
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
 

 
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#)
 
string[] Values = HiddenFieldID.Text.ToString().Split(',');
 
now, I used values from this array and did my task..
  Permalink  
v2

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

  Print Answers RSS
0 DamithSL 295
1 OriginalGriff 285
2 Sergey Alexandrovich Kryukov 157
3 Afzaal Ahmad Zeeshan 154
4 Peter Leow 115
0 OriginalGriff 7,510
1 DamithSL 5,494
2 Sergey Alexandrovich Kryukov 4,954
3 Maciej Los 4,936
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 13 Dec 2012
Copyright © CodeProject, 1999-2014
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