Click here to Skip to main content
Sign Up to vote bad
good
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 - 2:23


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:
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  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 425
1 OriginalGriff 330
2 Arun Vasu 253
3 Zoltán Zörgő 194
4 CPallini 173
0 Sergey Alexandrovich Kryukov 10,105
1 OriginalGriff 7,739
2 CPallini 4,181
3 Rohan Leuva 3,482
4 Maciej Los 2,999


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 13 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid