English 中文(简体)
• 如何将价值观从幼童一页传到母体一页
原标题:How to pass values from an asp.net child page to the parent page

我有两个网页:Page1Page2,这两个网页都可以打开同一儿童页。

如母体网页 页: 1 我希望儿童网页的某些投入能够返回父母的网页,如果母体的网页是的话。 页: 1 我要归还其他信息。

我确实确定谁是母子,我如何回来,是否在适当的文字箱或DroDownList中展示?

我使用<代码>查询。 UrlReferer将结果置于一个可铺设的变数中,我只字不提一个例子。

问题回答

由于这两页都可以是母,因此,按照你的要求,写上了双字母功能,该功能在网页上作为接收器发挥作用,并写成密码。

e.g.

javascript on parent page:

SetDataFromPopup(data)
{
    document.getElementById( TextBox1ClientId ).value = data;
}

人口统计:

window.opener.SetDataFromPopup(data);

这应该取决于你希望通过数据的情况,例如,如果你希望通过数据,就用一个子子子点击客户。

<input id="btnSave" type="submit" onclick="window.opener.SetDataFromPopup(data);" >Save</input>




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!