我是用winform写了一个登陆窗口,当输入账号密码是通过post传入到webbrower中,然后在webbrower中显示账号密码,代码是这样的 private void button1_Click(object sender, EventArgs e)
        {
            Encoding encoding = Encoding.GetEncoding("utf-8");
            string URL = "http://192.168.1.115/cccn/test_post.php";
            string postData = "username=" + textBox1.Text.ToString() + "&password=" + textBox2.Text.ToString();
            byte[] data = encoding.GetBytes(postData);
            HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(URL);
            myRequest.Method = "POST";
            myRequest.ContentType = "application/x-www-form-urlencoded;charset=utf-8";
            myRequest.ContentLength = data.Length;
            Stream st = myRequest.GetRequestStream();
            st.Write(data, 0, data.Length);
            st.Close();
            HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
            Stream receiveStream = myResponse.GetResponseStream();
            StreamReader readStream = new StreamReader(receiveStream, encoding);
            char[] read = new char[256];
            int count = readStream.Read(read, 0, 256);
            String str = null;
            while (count > 0)
            {
                str += new string(read, 0, count);
                count = readStream.Read(read, 0, 256);
            }
            myResponse.Close();
            readStream.Close(); 网页不显示,怎么回事啊c#.net postwebbrower