1.aspx
<asp:fileupload id= "fudtest" runat= "Server"/> <asp:button "id=" btnupload "
server" runat= "upload" onclick= "Btnupload_click"/> <br/> <asp:label id= "lblmessage"
runat= "Server" ></asp: Label>
1.aspx.cs
Upload file button protected void Btnupload_click (object sender, EventArgs e) {//define save path string Savepath = "
Uploadfiles "; Whether there is a directory if (! System.IO.Directory.Exists (Server.MapPath (Savepath))) {//No Create folder exists System.IO.Directory.Cr
Eatedirectory (Server.MapPath (Savepath)); ///Upload file if (fudtest.hasfile) {try {fudtest.saveas (serv) Er.
MapPath (savepath) + "\" + fudtest.filename); Lblmessage.text = lblmessage.text+ "Client path: + fudTest.PostedFile.FileName +" <br> "+" FileName: "+ System.IO.Path.GetFileName (fudtest.filename) +" <br> "+" file name extension: "+ System.IO. Path.getextension (fudtest.filename) + "<br>" + "File Size:" + fudTest.PostedFile.ContentLe Ngth + "kb<br>" + "file MIME type:" + FudTest.PostedFile.ContentType + ";br> "+" Save path: "+ Server.MapPath (savepath) +" \ "+ fudtest.filename+
"