当前位置:编程学习 > C#/ASP.NET >>

webbrowser iframe

通过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> --------------------编程问答-------------------- --------------------编程问答-------------------- 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();
                }
                
                
               

            }
--------------------编程问答--------------------
引用 2 楼 flyingsky00 的回复:
System.Windows.Forms.HtmlDocument document =
  this.webBrowser1.Document;应该可以找到


不行用HttpWebRequest 再读一下也可以
 HttpWebRequest loHttp = (HttpWebRequest)WebRequest.Create("webstationAddress");
tring……

这个没有id   ,要获取里面的一个文本框赋值  --------------------编程问答-------------------- 帮帮忙啊…… --------------------编程问答-------------------- http://yaofeng911.iteye.com/blog/552133 看看 这个 希望对你有帮助 --------------------编程问答-------------------- 有没有做过这个的啊,急了…… --------------------编程问答-------------------- 这个问题解决了http://www.nishizhen.cn/2010/03/c中webbrowser加载页面中的不同域的iframe的源代码的取得/
有一个新的问题了,webbrowser里面上传图片,怎么判断图片上传完成了?一次会上传几张,上传完自动激发提交按钮……
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,