嗨我上传文件,为此我已经实现了aspx和.cs页面。但是现在我只想添加进度条这样做了吗?
protected void btnUpload_Click(object sender, EventArgs e)
{
HttpPostedFile postedFile = FileUpload1.PostedFile;
string ClientFileName, ServerFileName;
if ((FileUpload1.HasFile && FileUpload1.PostedFile != null) || txtUrl.Text!="")
{
lblOutput.Text = "";
HttpPostedFile myFile = FileUpload1.PostedFile;
ServerFileName = System.IO.Path.Combine(ServerSavePathI, ClientFileName);
string serverPath = Server.MapPath(ServerFileName);
FileUpload1.SaveAs(serverPath);
}
}
这是.cs文件的代码,按钮上传的点击事件