【发布时间】:2015-01-24 02:37:06
【问题描述】:
这是它的图片..也看这里/..http://prntscr.com/5wadok
string fbid = stTextBox1.Text;
string ukey = stTextBox2.Text;
string jumlah = "4";
ASCIIEncoding encoding = new ASCIIEncoding();
string postData = "fbid=" + fbid + "&ukey=" + ukey + "&jumlah=" + jumlah; ;
byte[] data = encoding.GetBytes(postData);
WebRequest request = WebRequest.Create("http://dcvn-full.ga/test/dcgems.php");
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
Stream stream = request.GetRequestStream();
stream.Write(data, 0, data.Length);
stream.Close();
WebResponse response = request.GetResponse();
stream = response.GetResponseStream();
StreamReader sr = new StreamReader(stream);
//MessageBox.Show(sr.ReadToEnd());
stLabel4.Text = (sr.ReadLine());
sr.Close();
stream.Close();
我需要阅读 line21to25 并使用此命令或任何其他命令在 stlabel.5 中显示它,你能帮帮我吗?
【问题讨论】:
标签: c# post response webrequest