如何实现父子窗口并从子窗口向父窗口传递值?

发布于 2024-08-28 06:45:40 字数 270 浏览 3 评论 0原文

我正在开发 ASP.NET MVC 2 应用程序。

在我的一份数据输入表单中,我有一个“雇主”字段,旁边有一个“搜索”链接。当用户单击此链接时,将打开另一个带有搜索表单的窗口。用户使用搜索表单来搜索正确的雇主。向用户显示雇主列表。目前,用户必须将正确的雇主从子窗口复制并粘贴到原始窗口中。

我想实现它,以便子窗口中的每个雇主搜索结果都是一个超链接。然后,用户将单击正确的雇主,然后正确的雇主值将填充到原始父窗口雇主字段中。

我将如何在 ASP.NET MVC 2 中实现这一点?

I am working on an ASP.NET MVC 2 application.

In one of my data entry forms, I have an "employer" field which has a "search" link next to it. When a user clicks on this link, another window is opened with a search form. The user uses the search form to search for the correct employer. A list of employers is shown to the user. Currently, the user has to then copy and paste the correct employer from the child window into the original window.

I want to implement it so that each employer search result in the child window is a hyperlink. The user would then click on the correct employer and then the correct employer value would be populated in the original parent window employer field.

How would I go about implementing this in ASP.NET MVC 2?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

奶气 2024-09-04 06:45:40

就我个人而言,我不会使用新窗口,而是使用模式对话框。 jQuery UI 有一个很好的模式对话框,您可以使用 AJAX 加载它

Personally I would not use a new window but a modal dialog. jQuery UI has a nice modal dialog that you could load using AJAX

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文