How to implement file download progress bar using jquery in asp.net?

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

+3
source share
1 answer

This is not something you can implement correctly using only jQuery. You will need to use a component, such as NeatUpload , which includes a server module to track data loading.

+1
source

All Articles