阅读HTML code使用的网页浏览器C#的iframe [英] Read HTML code from iframe using Webbrowser C#
本文介绍了阅读HTML code使用的网页浏览器C#的iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何阅读HTML IFRAME code。使用web浏览器?
我有一个IFRAME网站,点击几下后,新的URL这IFRAME与HTML code的某些部分内打开。是否有一个方法可行阅读本?当我试图导航()这个网址,我重定向到该网站的主页(这是不可能两次打开此链接)。
乌里IFRAME_URL = webBrowser1.Document.Window.Frames [0]的.url;
也许有类似的东西:
乌里IFRAME_URL = webBrowser1.Document.Window.Frames [0]。 ... DOCUMENTTEXT;
解决方案
尝试:
字符串内容= webBrowser1.Document.Window.Frames [0] .WindowFrameElement.InnerText;
How to read IFRAME html code using WebBrowser?
I have site with iframe, and after few clicks new URL opens inside this IFRAME with some portion of HTML CODE. Is there a possiblity to read this?. When I am trying to Navigate() to this URL, I am redirected to main page of this site (it is not possible to open this link twice).
Uri IFRAME_URL = webBrowser1.Document.Window.Frames[0].Url;
Maybe there is something similar to:
Uri IFRAME_URL = webBrowser1.Document.Window.Frames[0]. ... DOCUMENTTEXT;
解决方案
Try:
string content = webBrowser1.Document.Window.Frames[0].WindowFrameElement.InnerText;
这篇关于阅读HTML code使用的网页浏览器C#的iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文