大侠们帮忙找错...
byte[] buffer = Encoding.ASCII.GetBytes("TextBox1=admin&TextBox2=admin");
HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create("127.0.0.1");
WebReq.Method = "post";
WebReq.ContentType = "application/x-www-form-urlencoded";
WebReq.ContentLength = buffer.Length;
Stream PostData = WebReq.GetRequestStream();
PostData.Write(buffer, 0, buffer.Length);
PostData.Close();
红色那一句报错...
无效的 URI: 无法确定 URI 的格式。
大虾们指点迷津
------解决方案--------------------
127.0.0.1不是URL格式,换成http://127.0.0.1试试