开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜