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

POST提交数据,时间格式,中间没有空格了.例如:本应该是 2009-5-17 5:07:30,传过来的却是2009-5-175:07:30

 为什么do.asp得到的时间格式,中间没有空格了,例如:本应该是 2009-5-17 5:07:30,传过来的却是2009-5-175:07:30
 如何解决呢?

           string param = "endTime=" + time.ToString() + "&time="";
            byte[] bs = Encoding.ASCII.GetBytes(param);

            HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("http://21.22.34.56/do.asp");
            req.Method = "POST";
            req.ContentType = "application/x-www-form-urlencoded";
            req.ContentLength = bs.Length;
            Stream reqStream = req.GetRequestStream();
            reqStream.Write(bs, 0, bs.Length);
            reqStream.Close();   --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- ding --------------------编程问答-------------------- 没人知道么? --------------------编程问答-------------------- 学习
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,