我想在WInForm中获取后缀名是.cgi的页面的值我要怎么获取每个属性的值呀
页面显示为:
ret=4&id=qbas&date=20100126&type=0&sub_type=0&num=1&time=1263579&error=不能使用麻烦各位大虾帮忙解答一下!!谢谢了
页面显示为:
ret=4&id=qbas&date=20100126&type=0&sub_type=0&num=1&time=1263579&error=不能使用麻烦各位大虾帮忙解答一下!!谢谢了
一个一个来吧
{
private Hashtable htValue = new Hashtable();
public ParameAnalyzer(string paramsString)
{
string[] sArray = paramsString.Split('&');
for(int i = 0;i<sArray.Length;i++)
{
string[] paramInfo = sArray[i].Split('=');
if (paramInfo.Length != 2)
continue;
htValue[paramInfo[0]] = paramInfo[1];
}
}
public string this[string key]
{
get
{
return (string)htValue[key];
}
}
}
应该不能用这个 Request.QueryString["date"]==date 我试着分析一下字符串吧
或
document.documentElement.outerHTML
HttpWebResponse res = (HttpWebResponse)hwr.GetResponse();
Stream str = res.GetResponseStream();
StreamReader sr = new StreamReader(str, Encoding.UTF8);获取整个页面
读出来之后是乱码呀:能通过其他办法进行编码吗?
我是从Winfor中读取另一个页面的信息 那个页面后缀是cgi
内容是:
ret=4&id=qbas&date=20100126&type=0&sub_type=0&num=1&time=1263579&error=不能使用 读出来之后“不能使用几个字”是乱码
我具体说一下吧
我是先提交一个url给对方,然后对方再返回一个结果,我要读取它返回的那个结果url中有一个参数是通过Socket返回的结果