如何从子页面到父页面文本框中获取选定的值? [英] How to get a selected value from the child page into the parent page textbox?

查看:66
本文介绍了如何从子页面到父页面文本框中获取选定的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个包含文本框和图像控件的页面.在单击日历图像时,将打开一个包含日历的子窗口.但是问题是,在子窗口中选择日期时,我无法将日期输入父页面的文本框中.我怎么能用示例代码解释它.


谢谢!!!!

Hi,


I have a page that contain a textbox and an image control. On clicking on the calender image a child window open that contain a calender.But the problem is, on the selection of date in the child window i can''t get the date into the textbox of parent page. How could i get it plz explain it with the sample code.


Thanks!!!!

推荐答案

您好
检查此
如何获取子页面中的hiddenfield值到下一页asp.net中的页面 [ ^ ]
最好的问候
M.Mitwalli
Hi
Check this
How to get hiddenfield value in child page to next page in asp.net[^]
Best Regards
M.Mitwalli


最好的方法是从javascript中打开子代,这样您就无需重定向到另一个页面.

另一种建议是,当您在next(child)页面中选择某项内容时,获取数据并将其通过
传递到第一页 querystring
表格申请
--cookiie
--session
在这种情况下,不需要最后两个(cookie/会话).
这意味着您需要将数据保留在第二页中.

在第一页中,检查querystring值,如果找到一个值,请在文本框中进行设置.



希望这会有所帮助.
欢呼
The best way is to open the child withow from javascript, so that you don;t need to redirect to another page.

Alternative suggestion, when you select something in next(child) page, get the data and pass it to the 1st page through
querystring
Forms Request
--cookiie
--session
The last two (cookie/session) is not needeed in this situation.
that means you need to persist your data in 2nd page.

In the 1st page check the querystring value and if you find a value set it in the text box.



Hope this helps.
cheers


我认为最好的传递方式是会话变量形式.既然打开子窗口作为弹出窗口,恕我直言,我想不出任何其他方式可以做到这一点.
I think the best way to pass it will be in form of session variable. Since you are opening the child window as a popup, IMHO, i cant think of any other way this can be done.


这篇关于如何从子页面到父页面文本框中获取选定的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆