我想在WInForm中获取后缀名是.cgi的页面的值我要怎么获取每个属性的值呀
页面显示为:
ret=4&id=qbas&date=20100126&type=0&sub_type=0&num=1&time=1263579&error=不能使用麻烦各位大虾帮忙解答一下!!谢谢了

解决方案 »

  1.   

    沒有params之类的属性可以调用么?
      

  2.   

    你这个是不是url里面的那个东西  我看着看着像是url 传递啊
      

  3.   

    Request.QueryString["date"]==date
    一个一个来吧  
       
      

  4.   

    不能用Request,就自己写个类分析一下字符串public class ParameAnalyzer
    {
        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];
            }
        }
    }
      

  5.   

    恩,它显示的不是属性
    应该不能用这个 Request.QueryString["date"]==date 我试着分析一下字符串吧
      

  6.   

    document.body.innerHTML

    document.documentElement.outerHTML
      

  7.   

     HttpWebRequest hwr = (HttpWebRequest)HttpWebRequest.Create(@"www.csdn.com");
                HttpWebResponse res = (HttpWebResponse)hwr.GetResponse();
                Stream str = res.GetResponseStream();
                StreamReader sr = new StreamReader(str, Encoding.UTF8);获取整个页面
      

  8.   


    读出来之后是乱码呀:能通过其他办法进行编码吗?
    我是从Winfor中读取另一个页面的信息 那个页面后缀是cgi
    内容是:
    ret=4&id=qbas&date=20100126&type=0&sub_type=0&num=1&time=1263579&error=不能使用 读出来之后“不能使用几个字”是乱码
      

  9.   

    各位帮下忙呀,还有没有其他办法呀
    我具体说一下吧
    我是先提交一个url给对方,然后对方再返回一个结果,我要读取它返回的那个结果url中有一个参数是通过Socket返回的结果