如何在当前页面div的另一个aspx页面中显示div并访问该div中的控件 [英] how to show a div in another aspx page in our current page div and access the controls in that div

查看:106
本文介绍了如何在当前页面div的另一个aspx页面中显示div并访问该div中的控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,小要求,我必须显示另一个页面(ASPX)的div
在我当前的页面(ASPX)div中.
我已经使用以下方法完成了

Hi friends, Small requirment I have to show a div of another page (ASPX)
in my current page (ASPX) div.
I have done with this following method

$("#RightDiv").load('AddItem.aspx #ItemsDiv');


我可以在当前div中显示该div,但无法访问从另一个页面添加的该div的控件?如何仅使用javscript访问当前页面中的控件?

请张贴我该怎么办?
谢谢
Ganesh


I am able to show that div in my current div but I am unable to access the controls of that div which I have added from another page? how can I access that controls in my current page with javscript only?

Please post me how can I do with this?
Thanks
Ganesh

推荐答案

(" ).load(' AddItem.aspx #ItemsDiv');
("#RightDiv").load('AddItem.aspx #ItemsDiv');


我可以在当前div中显示该div,但无法访问从另一个页面添加的该div的控件?如何仅使用javscript访问当前页面中的控件?

请张贴我该怎么办?
谢谢
Ganesh


I am able to show that div in my current div but I am unable to access the controls of that div which I have added from another page? how can I access that controls in my current page with javscript only?

Please post me how can I do with this?
Thanks
Ganesh


我同意,您不能使用javascript.
但是,为什么不尝试使用iframe..

I agree, you can''t do with javascript.
But why don''t try iframe..

<iframe width="750px" height="350px" src="AddItem.aspx"></iframe>


希望对您有帮助.


Hope it helps you.


最简单的答案是您不能使用Javascript.

jQuery代码正在客户端浏览器中执行.

您的控件由服务器上的IIS在.aspx页中执行.
The short answer is you can''t with Javascript.

The jQuery code is being executed in the client browser.

Your controls are executed in the .aspx page by IIS on the server.


这篇关于如何在当前页面div的另一个aspx页面中显示div并访问该div中的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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