2006-09-13 10:40
2006-09-13 10:58
2006-09-13 11:00

2006-09-13 15:08
tcp等網絡傳輸
你需要確定一行是否正好是一行string的byte

2006-09-13 16:39
给个代码可以吗?版主

2006-09-13 18:00
label3.Text = "上载网址
private void button4_Click(object sender, System.EventArgs e)
{//浏览上载文件
if(this.openFileDialog1.ShowDialog()==DialogResult.OK)
{
this.textBox3.Text=this.openFileDialog1.FileName;
}
}
private void button3_Click(object sender, System.EventArgs e)
{//上载文件
if(this.textBox3.Text==""|this.textBox4.Text=="")
return;
WebClient MyClient=new WebClient();
string URL=this.textBox3.Text;
string FileName=this.textBox4.Text;
byte[] MyResponseArray=null;
try
{
MyResponseArray = MyClient.UploadFile(URL,FileName);
MessageBox.Show("文件上载成功!","信息提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
catch(Exception Err)
{
MessageBox.Show("文件上载失败!错误是:"+Err.Message,"信息提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
finally
{
MessageBox.Show("\n服务器的回复为: \n"+System.Text.Encoding.ASCII.GetString(MyResponseArray));
}

2006-09-13 19:28

2006-09-14 10:06

2006-09-14 10:09

2006-09-14 16:51