将外部网站加载到我的.aspx页面

编程入门 行业动态 更新时间:2024-10-28 06:34:44
本文介绍了将外部网站加载到我的.aspx页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在我的网站项目中显示任何外部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页面

本文发布于:2023-11-11 11:42:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1578343.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   页面   网站   aspx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!