将值从jquery模式弹出窗口发送到父级的问题

下面是我的代码

你能告诉我如何将此页面上的label1.text发送到product.aspx并更新label1.text ???

product.aspx

        

<a href="https://stackoverflow.com/questions/6237009/problem-sending-value-from-jquery-modal-popup-to-parent/viewcart.aspx?fn=" onclick="$(this).modal({width:833, height:453}).open(); return false;">show popup

product.aspx.cs代码背后

 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { Label1.Text = (int.Parse(Label1.Text) + 1).ToString(); } } 

viewcart.aspx

      

current value:

viewcart.aspx.cs codebehind

 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class viewcart : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Label1.Text = Request["fn"]; } } protected void Button1_Click(object sender, EventArgs e) { Label1.Text = (int.Parse(Label1.Text) - 1).ToString(); } } 

您可以向页面添加一个asp:HiddenField控件,通过javascript设置它的值,它将被发送回您的代码隐藏。