【发布时间】:2011-06-14 04:35:52
【问题描述】:
嗨,我正在上传一个文件,为此我已经实现了 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文件按钮上传点击事件的代码
【问题讨论】:
标签: c# javascript jquery jquery-ui jquery-plugins