【发布时间】:2011-10-18 13:44:53
【问题描述】:
我正在使用<webbrowser>.Document.Window.Frames 来获取帧。
我的<WebBrowser> 有 2 帧。我唯一的问题是,我的索引似乎是 0,但不是 1。
有什么帮助吗?
HtmlWindow wf = wb.Document.Window.Frames[1];
string s = wf.Document.Body.OuterHtml;
并查看源代码
<frameset rows="0,*" border="0" frameborder="0" framespacing="0">
<frame name="entrustTruePassAppletFrame" src="EntrustTruePassApplet.html" marginwidth="0" marginheight="0" scrolling="no" noresize>
<!-- It is mandatory for the frame where the user interaction happens to have the name defined in the Configuration as appletHtmlGuiTarget-->
<frame name="entrustTruePassGuiFrame" src="AuthenticateUserInputRoamingEPF.html"> </frameset>
【问题讨论】:
-
你在问网页的源代码吗?
-
是的,只是您声明框架的相关部分
-
这是.net app中的代码:
-
HtmlWindow wf = wb.Document.Window.Frames[1];字符串 s = wf.Document.Body.OuterHtml;并查看源代码
-
别忘了把它标记为答案 ;)
标签: c# asp.net vb.net web-controls