我想在我的网站项目中显示任何外部www.xyz网站的内容使用ASP.NET / C#。 - 到目前为止,我已经尝试了HTML iframe标签
Hi, I want to show the content of any external www.xyz 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="developer.mozilla/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("www.google");´ });此代码只返回错误找不到任何网站,但相信我,www.google它确实存在。 任何想法如何实现这种方法在iframe中加载任何外部网站的内容或使用C#加载任何其他替代方案? 提前致谢!
this code just return error Not Found for any website, but trust me, www.google 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!
推荐答案( #testLoad)。load( www.google);'}); ("#testLoad").load("www.google");´ });
此代码只返回错误找不到任何网站,但相信我,www.google它确实存在。 任何想法如何实现这种方法在iframe中加载任何外部网站的内容或使用C#加载任何其他替代方案? 提前致谢!
this code just return error Not Found for any website, but trust me, www.google 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!
您可以使用jQuery UI库以简单的方式完成。 如下例所示: - http:// jsfiddle/smrutis1984/qar7zf03/5/ 希望会有所帮助。 You can do it in simple way using jQuery UI library. As displayed in below example :- jsfiddle/smrutis1984/qar7zf03/5/ Hope will be helpful.
更多推荐
将外部网站加载到我的.aspx页面
发布评论