in effetti si possono fare tante cose, ma se non si conosce javascript...
dò un esempio ESSENZIALE che credo ti risolvano il problema
pagina A.aspx che apre il popup B.aspx.
in b vi è un pulsante che richiama una procedura server in a. Questo è possibile, ajax o non ajax, solo facendo una richiesta server e mandando le giuste informazioni
pagina a.aspx
codice:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="a.aspx.vb" Inherits="corso_apogeo.a"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>a</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script type="text/javascript">
var w = null;
function apri_popup()
{
w = window.open("b.aspx", "popup", "top=300px, left=300px,width=300px,height=300px");
if(w) w.focus();
}
function refresh(parametro1, parametro2, parametro3)
{
document.getElementById("parametro1").value = parametro1;
document.getElementById("parametro2").value = parametro2;
document.getElementById("parametro3").value = parametro3;
document.getElementById('refresh').click();
}
</script>
</HEAD>
<body MS_POSITIONING="FlowLayout">
<h1>a</h1>
<form id="Form1" method="post" runat="server">
<asp:Button ID="refresh" Runat="server" style="DISPLAY:none"></asp:Button>
<input type="hidden" id="parametro1" runat="server" >
<input type="hidden" id="parametro2" runat="server" >
<input type="hidden" id="parametro3" runat="server" >
apri popup
</form>
</body>
</HTML>
codice a.vb
codice:
Public Class a
Inherits System.Web.UI.Page
#Region " Codice generato da Progettazione Web Form "
'Chiamata richiesta da Progettazione Web Form.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Protected WithEvents refresh As System.Web.UI.WebControls.Button
Protected WithEvents parametro1 As System.Web.UI.HtmlControls.HtmlInputHidden
Protected WithEvents parametro2 As System.Web.UI.HtmlControls.HtmlInputHidden
Protected WithEvents parametro3 As System.Web.UI.HtmlControls.HtmlInputHidden
'NOTA: la seguente dichiarazione è richiesta da Progettazione Web Form.
'Non spostarla o rimuoverla.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: questa chiamata al metodo è richiesta da Progettazione Web Form.
'Non modificarla nell'editor del codice.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Inserire qui il codice utente necessario per inizializzare la pagina
End Sub
Private Sub refresh_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles refresh.Click
'evento scatenato dal controllo refresh
'recupero i tre parametri passati e li stampo a video
PrintLn(Me.parametro1.Value, "parametro1")
PrintLn(Me.parametro2.Value, "parametro2")
PrintLn(Me.parametro3.Value, "parametro3")
'richiamo eventualmente la procedura
'xyz(parametro1, parametro2, parametro3)
End Sub
End Class
pagina b.aspx
codice:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="b.aspx.vb" Inherits="corso_apogeo.b2"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>b</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script type="text/javascript">
function refresh_griglia()
{
if(window.opener)
{
if(window.opener.refresh)
{
window.opener.refresh("Stefano","Carlo","Nicola");
}
self.close();
}
}
</script>
</head>
<body MS_POSITIONING="FlowLayout">
<h1>b</h1>
<form id="Form1" method="post" runat="server">
<input type="button" value="chiudi" onclick="refresh_griglia();" />
</form>
</body>
</html>
niente codice b.vb
NOTA: con ajax fai ne più ne meno la stessa richiesta http alla pagina a.aspx... ma questa è un'altra storia