问题描述
我想在may网站上显示网站的一部分。网站的链接是
[]
i想要的只是在我的网站上显示注释摘要结果的列表。
我尝试过:
我已经尝试了
< pre>& lt; iframe src =http://david.abcc.ncifcrf.gov /api.jsp?type =ENTREZ_GENE_ID& ;;;;;;;;;;;;;;;;;;; / p>
& lt; / iframe>< / pre>
和
-page.aspx
& lt; asp:Literal ID =tm_litrunat =server>< / asp:Literal>
-page.aspx.cs
WebRequest wrq = WebRequest.Create(https://www.w3schools.com);
WebResponse wrs = wrq.GetResponse();
StreamReader sr = new StreamReader(wrq.GetRequestStream());
string sHTML = sr.ReadToEnd();
sr.Close();
if(sHTML!= string.Empty&& sHTML!= null)
{
tm_lit.Text = sHTML;
}
但这两种技巧都出现如下错误
1)
拒绝显示'帧中的http://david.abcc.ncifcrf.gov/api.jsp?type=ENTREZ_GENE_ID&ids=2919,6347,6348,6364&tool=summary',因为它将'X-Frame-Options'设置为'sameorigin '
2)
无法加载资源:net :: ERR_BLOCKED_BY_RESPONSE
i want to display the part of a web site in may web site. the link of web site is
[LNK]
i want to just show the LIST of "Annotation Summary Results" in my web site.
What I have tried:
I have Tried
<pre><iframe src="http://david.abcc.ncifcrf.gov/api.jsp?type=ENTREZ_GENE_ID&ids=2919,6347,6348,6364&tool=summary">
<p>Your browser does not support iframes.</p>
</iframe></pre>
and
-page.aspx
<asp:Literal ID="tm_lit" runat="server"></asp:Literal>
-page.aspx.cs
WebRequest wrq = WebRequest.Create("https://www.w3schools.com");
WebResponse wrs = wrq.GetResponse();
StreamReader sr = new StreamReader(wrq.GetRequestStream());
string sHTML = sr.ReadToEnd();
sr.Close();
if (sHTML != string.Empty && sHTML != null)
{
tm_lit.Text = sHTML;
}
but both techniques through the same error as below
1)
Refused to display 'http://david.abcc.ncifcrf.gov/api.jsp?type=ENTREZ_GENE_ID&ids=2919,6347,6348,6364&tool=summary' in a frame because it set 'X-Frame-Options' to 'sameorigin'
2)
Failed to load resource: net::ERR_BLOCKED_BY_RESPONSE
推荐答案
这篇关于如何在我们的网站上查看其他网站的部分(ASP.NET)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!