hi i m uploading a file and for that i have implemented aspx a开发者_如何学Pythonnd .cs pages.but now i want to add progress bar only.how to do that?
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);
}
}
this is the code of .cs file the click event of button upload
This is not something you can implement properly using jQuery alone. You would need to use a component like NeatUpload, which includes a server-side module to track how much data is uploaded.
精彩评论