1
2
//
*********************上传文件2.0********************************
3
protected
void
Button1_Click(
object
sender, EventArgs e)
4
{
5
6
string path = Server.MapPath("~/image/");
7
8
9
this.FileUpload1.SaveAs (path + this.FileUpload1 .FileName );
10
//
11
this.Label1.Text = "路径:"+this.FileUpload1 .PostedFile .FileName +this.FileUpload1 .PostedFile.ContentLength ;
12
// this.Label2.Text = "wenjiansuccess!";
13
14
}
15
16
}
17

2

3

4



5

6

7

8

9

10

11

12

13

14

15

16

17
