I see nothing posted so far that will actually work, at least not without a lot of effort, so try this:
Page1.aspx.cs:
protected void Page_Load(object sender, EventArgs e)
{
// Insure that the __doPostBack() JavaScript method is created...
this.ClientScript.GetPostBackEventReference(this, string.Empty);
if (this.IsPostBack)
{
string eventArgument = (this.Request["__EVENTARGUMENT"] == null) ? string.Empty : this.Request["__EVENTARGUMENT"];
if ( eventArgument == "CallServersideFunction" )
{
yourFunction();
}
}
}
protected void yourFunction()
{
this.Response.Write("yourFunction called<br>");
}
Page2.aspx:
<form id="Form1" method="post" runat="server">
<input type="button" onclick="callServersideFunction();" value="Call Server-side Function">
</form>
<script type="text/javascript">
<!--
function callServersideFunction()
{
window.opener.<%= ClientScript.GetPostBackEventReference(this, "CallServersideFunction") %>;
}
// -->
</script>
NC...