在不使用用户控件的情况下在placehoder中显示不同的页面 [英] Show different Pages in placehoder without using User control

查看:83
本文介绍了在不使用用户控件的情况下在placehoder中显示不同的页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,是否有其他方法可以在占位符中显示网页,但是这些网页是普通网页,而不是用户控件.

I am wondering, is there any alternative method to show web pages in placeholder but the web pages is an ordinary web page, not a user control.

推荐答案

我不确定您实际要查找的内容是什么,但是要在一个页面中显示多个页面,可以使用iframe或简单地使用框架.
I am not sure what actually you are looking for, but to show multiple pages in a single page you can use iframe or simpally frames.


如果您不想在其中使用iframe在这种情况下,您可以使用jQuery的load方法,该方法可以将当前页面中任何页面的html注入.在单击任何菜单时,使用jQuery的load方法获取目标页面的html并将html注入到主页的某些div中.但是在这种情况下,子页面中的事件处理将不容易实现.如果只显示内容,则可以使用这种方法.
If you don''t want to use iframe in that case you can use the load method of jQuery, which can inject the html of any page in you current page. On click of any menu use the load method of jQuery get the html of the destination page and inject the html in some div of the main page. But in this case your event handling in the child page will be not easy to implement. If you content is display only then you can use this approach.


感谢Prakash,

该项目是一个标准的Web项目,其中主页具有标题和菜单.根据用户单击的菜单,占位符
将显示不是用户控制的各种输入形式.我不知道是否可以在不使用iframe的情况下做到这一点.
Thanks Prakash,

The project is a standard Web project where the main page has header and menus. Depending on which menu the user clicked, the placeholder
will display various input form that are not user control. I wonder if it is possible to do that without using iframe.


这篇关于在不使用用户控件的情况下在placehoder中显示不同的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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