Hi, I am uploading a file and for this I have implemented aspx and .cs pages.but now I want to add a progress bar only. How to do it?
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 .cs file code, clicking the download button of the button
source
share