I'm try to Send Data Using the WebRequest with POST But my problem is No data has be streamed to the server.
string user = textBox1.Text; string password = textBox2.Text; ASCIIEncoding encoding = new ASCIIEncoding(); string postData = "username" + user + "&password" + password; byte[] data = encoding.GetBytes(postData); WebRequest request = WebRequest.Create("http://localhost/s/test3.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 sr99 = new StreamReader(stream); MessageBox.Show(sr99.ReadToEnd()); sr99.Close(); stream.Close();