C# 从网页获取html结果

C# 从网页获取html结果,c#,.net,C#,.net,我计划创建一个movil应用程序(为了好玩),它应该使用这个网页()的结果。是否有任何方法可以在我的网络代码中创建浏览器实例,并读取此结果,然后使用web服务发布它。。 比如: var IE= new broswer("http://consultawebvehiculos.carabineros.cl/index.php"); var result=IE.FindElementByID("txtIdentityCar").WriteText(YourIdentityCar); publicTo

我计划创建一个movil应用程序(为了好玩),它应该使用这个网页()的结果。是否有任何方法可以在我的网络代码中创建浏览器实例,并读取此结果,然后使用web服务发布它。。 比如:

var IE= new broswer("http://consultawebvehiculos.carabineros.cl/index.php");
var result=IE.FindElementByID("txtIdentityCar").WriteText(YourIdentityCar);
publicToWebSerivce(result);
更新: 使用Fiddler,我可以看到http post是这样的:

POST http://consultawebvehiculos.carabineros.cl/index.php HTTP/1.1
Host: consultawebvehiculos.carabineros.cl
Connection: keep-alive
Content-Length: 61
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Origin: http://consultawebvehiculos.carabineros.cl
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.17 (KHTML, like Gecko)      Chrome/24.0.1312.57 Safari/537.17
Content-Type: application/x-www-form-urlencoded
Referer: http://consultawebvehiculos.carabineros.cl/index.php
Accept-Encoding: gzip,deflate,sdch
Accept-Language: es-ES,es;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

accion=buscar&txtLetras=CL&txtNumeros1=sk&txtNumeros2=12&vin=
可能我需要一些像webclient这样的.Net类来连接php页面…不确定


更新:我终于找到了使用Fiddler了解总参数的解决方案,并且我使用了来自

的代码。如果您只是对抓取页面感兴趣,我建议使用

如果您还想显示页面,则可以使用该控件。

我们一直在使用该控件执行类似任务。它允许您发送请求、接收响应/状态代码等


(这是一个Java库,因此您可以在google上搜索.Net端口,也可以使用转换器将Java程序集转换为.Net程序集-请参阅以获取指导。我们使用了转换方法)。

我想对该页面做的是:1)连接php页面。2) 向页面添加输入。3) 使用http post发送此信息。4) 等待响应并检查html。