Evo predloga resenja sa "javascript". U JS-metodi punim HiddenControl koje mozes kasnije u "Page_Load" obraditi kao vrednosti sa Parent-strane...
Ja sam za primer imao samo jedan textBox mada je princip isti i za 10...
Parent strana (Default.aspx):
Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language="javascript">
function getValueFromFrame() {
var iFrame = parent.frames[0];
var valFromIFrame = TestIFrame.document.forms[0].elements['txtFromIFrame'];
document.forms[0].hdnFromIFrame.value = valFromIFrame.value;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:HiddenField ID="hdnFromIFrame" Value="0" runat="server" />
<div>
</div>
<table width="500" cellpadding="5">
<tr>
<td><asp:Button ID="btnTestIFrame" runat="server" OnClientClick="getValueFromFrame();" Text="TestIFrame" />
<asp:TextBox ID="txtOnParentPage" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>
<iframe name="TestIFrame" width="400" height="220" src="IFramePage.aspx">
</iframe></td>
</tr>
</table>
</form>
</body>
</html>
Parent strana (codebehind):
Code:
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack Then
Me.txtOnParentPage.Text = Me.hdnFromIFrame.Value
End If
End Sub
End Class
Strana iz IFrame-a
Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="IFramePage.aspx.vb" Inherits="IFramePage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtFromIFrame" runat="server" Text="Text From IFrame"></asp:TextBox>
</div>
</form>
</body>
</html>
Nadam se da ce biti od pomoci...