开发者

how to implement progress bar of file upload using jquery in asp.net?

开发者 https://www.devze.com 2023-03-12 12:23 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消