请教各位大神:
客户端有个按钮,按钮代码如下
private void button4_Click(object sender, EventArgs e)
{
WebClient wc = new WebClient();
wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
string postString = "data1=" + textBox1.Text ;
byte[] postData = Encoding.UTF8.GetBytes(postString);
byte[] byRemoteInfo = wc.UploadData("http://localhost:2110/valueDisplay.aspx", "POST", postData);
string _RemoteInfo = System.Text.Encoding.UTF8.GetString(byRemoteInfo);
textBox51.Text = _RemoteInfo;
}
网页端代码写如下代码时,winform程序中的textbox51.text能够得到返回的字符。
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Request.Form["data1"]);
Response.Write("收到OK!");
Response.End();
}
但是我想在网页的控件textbox.text显示传递的数值应该怎么写