webbrowser iframe

T_long 2011-04-25 12:00:12
通过webbrowser如何获取这个src里面的内容
<IFRAME style="BORDER-RIGHT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: 0px; DISPLAY: block; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; OVERFLOW: hidden; BORDER-LEFT: 0px; WIDTH: 100%; PADDING-TOP: 0px; BORDER-BOTTOM: 0px; HEIGHT: 100%" border=0 frameSpacing=0 src="http://www.ganji.com/ajaxupload_proxy.html?_rdm=guid_11_13036993282030_35906987470356533#sysIframeInitInfo=%7B%22uploadUrl%22%3A%22http%3A%2F%2Fwww.ganji.com%2Fswftool%2Fuploader2%2Fincludes%2Fupload.php%22%2C%22uploadProxyUrl%22%3A%22http%3A%2F%2Fwww.ganji.com%2Fajaxupload_proxy.html%22%2C%22uploadedCount%22%3A1%2C%22uploadDir%22%3A%22tmp%22%2C%22maxNum%22%3A8%2C%22maxSize%22%3A5242880%2C%22type%22%3A%22gif%2Cjpg%2Cjpeg%2Cpng%2Cbmp%22%2C%22typeDescription%22%3A%22%E5%9B%BE%E7%89%87%22%2C%22resizeImage%22%3Atrue%2C%22resizeWidth%22%3A600%2C%22resizeHeight%22%3A450%2C%22resizeCutEnable%22%3Afalse%2C%22createMiddle%22%3Afalse%2C%22middleWidth%22%3A334%2C%22middleHeight%22%3A208%2C%22middleCutEnable%22%3Afalse%2C%22createThumb%22%3Atrue%2C%22thumbWidth%22%3A90%2C%22thumbHeight%22%3A75%2C%22thumbCutEnable%22%3Atrue%2C%22watermark%22%3Afalse%2C%22watermarkMiddle%22%3Atrue%2C%22debug%22%3Afalse%2C%22from%22%3A%22%22%2C%22iframeId%22%3A%22guid_3_13036967447650_10615886067291508%22%2C%22autoSetHeight%22%3Atrue%2C%22proxyUrl%22%3A%22http%3A%2F%2Fbj.ganji.com%2Fiframeproxy.html%22%7D&v=4" frameBorder=0 scrolling=no jQuery1303696744312="1"></IFRAME>
...全文
342 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
T_long 2011-04-26
  • 打赏
  • 举报
回复
这个问题解决了http://www.nishizhen.cn/2010/03/c中webbrowser加载页面中的不同域的iframe的源代码的取得/
有一个新的问题了,webbrowser里面上传图片,怎么判断图片上传完成了?一次会上传几张,上传完自动激发提交按钮……
T_long 2011-04-25
  • 打赏
  • 举报
回复
有没有做过这个的啊,急了……
yangzhili 2011-04-25
  • 打赏
  • 举报
回复
http://yaofeng911.iteye.com/blog/552133 看看 这个 希望对你有帮助
T_long 2011-04-25
  • 打赏
  • 举报
回复
帮帮忙啊……
T_long 2011-04-25
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 flyingsky00 的回复:]
System.Windows.Forms.HtmlDocument document =
this.webBrowser1.Document;应该可以找到


不行用HttpWebRequest 再读一下也可以
HttpWebRequest loHttp = (HttpWebRequest)WebRequest.Create("webstationAddress");
tring……
[/Quote]
这个没有id ,要获取里面的一个文本框赋值
flyingsky00 2011-04-25
  • 打赏
  • 举报
回复
System.Windows.Forms.HtmlDocument document =
this.webBrowser1.Document;应该可以找到


不行用HttpWebRequest 再读一下也可以
HttpWebRequest loHttp = (HttpWebRequest)WebRequest.Create("webstationAddress");
tring html = "";
try
{
HttpWebResponse loWebResponse = (HttpWebResponse)loHttp.GetResponse();
if (loWebResponse.StatusCode == HttpStatusCode.OK)
{
StreamReader responseReader;
Stream webResponseS = loWebResponse.GetResponseStream();
webResponseS.ReadTimeout = 10000;
responseReader = new StreamReader(webResponseS, System.Text.Encoding.UTF8);
html = responseReader.ReadToEnd();
webResponseS.Close();
responseReader.Close();
}




}

110,535

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧