问题描述
我想在我的网站项目中显示任何外部www.xyz.com网站的内容使用ASP.NET / C#。
- 到目前为止,我已经尝试了HTML iframe标签
Hi,
I want to show the content of any external www.xyz.com website in my web project that is built using ASP.NET/C#.
- so far I have tried the HTML iframe tag
<iframe id="myiframe" src="https://developer.mozilla.org/en/docs/Web/HTML/Element/iframe"></iframe>
并且这不会显示任何内容(空iframe),因为此标记仅适用于我的o内(包含)的页面wn project。
- 我还尝试使用JQuery将内容加载到div标签中,使用以下JQuery 加载 功能但似乎没什么用。
and this does not display anything (empty iframe) because this tag only works with pages that are within (contained) in my own project.
- I also tried to use JQuery to load the content into a div tag using the following JQuery load function but nothing seems to work.
jQuery(document).ready(function () {
$("#testLoad").load("http://www.google.com");´
});
此代码只返回错误找不到任何网站,但相信我,www.google.com它确实存在。
任何想法如何实现这种方法在iframe中加载任何外部网站的内容或使用C#加载任何其他替代方案?
提前致谢!
this code just return error Not Found for any website, but trust me, www.google.com it does exists.
any idea how can I achieve this approach of loading the content of any external website within an iframe or with any other alternative using C#?
Thanks in advance!
推荐答案
此代码只返回错误找不到任何网站,但相信我,www.google.com它确实存在。
任何想法如何实现这种方法在iframe中加载任何外部网站的内容或使用C#加载任何其他替代方案?
提前致谢!
this code just return error Not Found for any website, but trust me, www.google.com it does exists.
any idea how can I achieve this approach of loading the content of any external website within an iframe or with any other alternative using C#?
Thanks in advance!
这篇关于将外部网站加载到我的.aspx页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!