<form Name="Advanced" method="POST" action="https://www.oxhp.com/cgi-bin/provider_roster/avsearch/avsearch_ch.pl"><input type="text" name="SearchFor" value="Doctor" />
<input type="text" name="lang" value="cn" />
<input type="text" name="_DOCTYPE_TEXT" value="" />
<input type="text" name="_SPECIALTY_TEXT" value="" />
<input type="text" name="_NETWORK_TEXT" value="" />
<input type="text" name="_MILES_TEXT" value="" />
<input type="text" name="_STATE_TEXT" value="" />
<input type="text" name="_LANGUAGE_TEXT" value="" />上面的是需要传的搜索参数,我应该怎么抓取?
<input type="text" name="lang" value="cn" />
<input type="text" name="_DOCTYPE_TEXT" value="" />
<input type="text" name="_SPECIALTY_TEXT" value="" />
<input type="text" name="_NETWORK_TEXT" value="" />
<input type="text" name="_MILES_TEXT" value="" />
<input type="text" name="_STATE_TEXT" value="" />
<input type="text" name="_LANGUAGE_TEXT" value="" />上面的是需要传的搜索参数,我应该怎么抓取?
解决方案 »
- C#定义int型断点调试时看到的值是十六进制的,怎么改过来?
- 关于asp.net中验证用户是否登录
- 服务器控件本地测试无响应
- 本地access数据库上传到服务器(存储为了sql)
- 请问为什么自定义控件中的背景图片不能显示?
- 关于GridView列样式的设置
- System.Security.Principal.WindowsIdentity.GetCurrent().Name 得到的值在不同的系统上是不一样的。(没多少分了)
- 帮忙节俭一下代码
- visio是做什么用的?和vs.net有什么关系?
- 做好了treeview,可以出现一个问题,就是节点上的链接时实现onmouse="window.status='aa'"怎么实现
- A页是开的 关闭弹出的 B页 返回A页 不要再 读取的警告!!
- null 条件判断
System.Collections.Specialized.NameValueCollection param = new System.Collections.Specialized.NameValueCollection();
param.Add("SearchFor", "Doctor");
//...
byte[] b= wb.UploadValues(new Uri("https://www.oxhp.com/cgi-bin/provider_roster/avsearch/avsearch_ch.pl ",param));
//...最好用httplook看看,WebClient 可以完全伪装成ie
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1502: The best overloaded method match for 'System.Uri.Uri(string, bool)' has some invalid argumentsSource Error: Line 44: param.Add("_ZIP ", "11220");
Line 45: //...
Line 46: byte[] b = wb.UploadValues(new Uri("https://www.oxhp.com/cgi-bin/provider_roster/avsearch/avsearch_ch.pl", param));
Line 47: //...
Line 48: string result = Encoding.Default.GetString(b);
Source File: e:\project\clinic\seachSSL.aspx.cs Line: 46
出现这样的错误,不知道什么问题啊!help
{
public TrustAllCertificatePolicy()
{ } public bool CheckValidationResult(ServicePoint sp,X509Certificate cert, WebRequest req, int problem)
{
return true;
}
}
protected void Page_Load(object sender, EventArgs e)
{
System.Net.ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();
string backstr = "";
string param = "SearchFor=Doctor&lang=cn&_DOCTYPE_TEXT=Primary Care Physician 主治醫生/OBGYN婦科醫生&_SPECIALTY_TEXT=Pediatrics 兒科&_NETWORK_TEXT=Freedom&_MILES_TEXT=5 英哩&_STATE_TEXT=New York 紐約州&_LANGUAGE_TEXT=Any&_ZIP=11220";
byte[] bs = Encoding.ASCII.GetBytes(param); HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("https://www.oxhp.com/cgi-bin/provider_roster/avsearch/avsearch_ch.pl");
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength = bs.Length; using (Stream reqStream = req.GetRequestStream())
{
reqStream.Write(bs, 0, bs.Length);
}
using (WebResponse wr = req.GetResponse())
{
StreamReader sr = new StreamReader(wr.GetResponseStream(), System.Text.Encoding.Default);
backstr = sr.ReadToEnd();
sr.Close();
wr.Close();
} Response.Write(backstr);
}还是得不到东西啊!郁闷死了!
获取你想要的