Click to See Complete Forum and Search --> : Upload Progress Bar


toraj58
December 18th, 2008, 04:53 PM
how to show an progress bar when uploading in asp.net?
if any one has experience with a free third party component that can be integrated easily please introduce me.

also anycode from scratch is appriciated.

dannystommen
December 19th, 2008, 02:39 AM
I haven't take a good look at itm but I think http://www.codeproject.com/KB/aspnet/FlashUpload.aspx is an good article for this

toraj58
December 19th, 2008, 02:51 PM
it looks fine; but the problem is: it needs flash to be installed and if not it fail or user should wait that flash player download on his/ her computer. this issue may bother some users.

brettle
December 24th, 2008, 05:40 PM
You could try my open source NeatUpoad component:

http://www.brettle.com/neatupload

--Dean

TheCPUWizard
December 24th, 2008, 06:24 PM
Or just us AJAX components with .NET 3.5......

brettle
December 24th, 2008, 07:07 PM
AFAIK, the AJAX progress bars are not sufficient for showing upload progress. You need an HttpModule to monitor the upload while it is in progress. Page handlers don't get called until the upload is already complete.

--Dean

TheCPUWizard
December 24th, 2008, 10:02 PM
AFAIK, the AJAX progress bars are not sufficient for showing upload progress. You need an HttpModule to monitor the upload while it is in progress. Page handlers don't get called until the upload is already complete.

--Dean
Depends on how you do it ;) :D

I have successfully used BOTH of the following.

1) Start the transfer on a unique connection. Then the UpdatePanel can simply ask the server how much has ben received.

2) Do the transfer in "chunnks". This is more coding, buit provides for ALOT of flexability (including parallel transfers, and resumable operations.

brettle
December 24th, 2008, 11:59 PM
Depends on how you do it ;) :D

I have successfully used BOTH of the following.

1) Start the transfer on a unique connection. Then the UpdatePanel can simply ask the server how much has ben received.

2) Do the transfer in "chunnks". This is more coding, buit provides for ALOT of flexability (including parallel transfers, and resumable operations.

For #1, the server still needs to know how much has been received during the upload and to do that you need an HttpModule. If you have some other way of determining it, please indicate how.

For #2, the user needs to have some extra software installed (e.g. an ActiveX control). Browsers do not provide a way to upload files in chunks by default. Since, the original poster indicated he wanted something that didn't even require Flash, it seems safe to assume that requiring other extra client-side software is not acceptable to him.

--Dean

TheCPUWizard
December 25th, 2008, 10:09 AM
For #1, the server still needs to know how much has been received during the upload and to do that you need an HttpModule. If you have some other way of determining it, please indicate how.

Yes, but it is only a few lines of code in the server application.


For #2, the user needs to have some extra software installed (e.g. an ActiveX control). Browsers do not provide a way to upload files in chunks by default. Since, the original poster indicated he wanted something that didn't even require Flash, it seems safe to assume that requiring other extra client-side software is not acceptable to him.

Many clients already have BITS (http://msdn.microsoft.com/en-us/library/aa362708.aspx) installed, and I have found very few occasions when a client could NOT install it.

No one solution meets every need. These are just alternatives that I have found useful.

brettle
December 25th, 2008, 06:47 PM
Yes, but it is only a few lines of code in the server application.

Having done this, I can assure you that it is a more than a few lines of code. If you have a way to do this with a few lines of code, please post it or provide a link.


Many clients already have BITS (http://msdn.microsoft.com/en-us/library/aa362708.aspx) installed, and I have found very few occasions when a client could NOT install it.
BITS could certainly be useful for an intranet app, but it's pretty clearly not a good fit for the original poster's requirements.


No one solution meets every need.

Agreed.

--Dean

TheCPUWizard
December 25th, 2008, 07:49 PM
Old but handy implementation [not mine] http://www.codeproject.com/KB/aspnet/UpldFileToDiskProgressBar.aspx

brettle
December 27th, 2008, 07:57 PM
Old but handy implementation [not mine] http://www.codeproject.com/KB/aspnet/UpldFileToDiskProgressBar.aspx

Thanks. I was aware of that implementation, so at least I know you there isn't some secret recipe you have. :-)

Just for the record, that is almost 1000 lines of code. Even accounting for whitespace and comments, it is probably a few hundred, not just a few.

--Dean

TheCPUWizard
December 27th, 2008, 08:05 PM
Thanks. I was aware of that implementation, so at least I know you there isn't some secret recipe you have. :-)

Just for the record, that is almost 1000 lines of code. Even accounting for whitespace and comments, it is probably a few hundred, not just a few.

--Dean

"Few" is such a relative term :D:D

Seriously, once you make sure it does what you want, and have installed it into your own library, the amount of code that must be included in a specific page to use the functionallity. Is quite small.

Consider as an analogy, that you decide to purchase a set of UI controls (e.g. DevEXpress). In many cases you can do a simple search/replate in your designer files, and presto you have (basic) functionallity with the new controls.....You wouldn't count the hundrreds os thousands of lines of source code from that as part of your project...would you?

brettle
December 27th, 2008, 10:45 PM
"Few" is such a relative term :D:D

Seriously, once you make sure it does what you want, and have installed it into your own library, the amount of code that must be included in a specific page to use the functionallity. Is quite small.

Of course, but if you review the thread, you'll see that I initially suggested using an existing implementation, and you replied by saying "Or just use AJAX components with .NET 3.5......". I took that to mean that you thought there was an easy way to do it without using a 3rd-party implementation. That's why I was pushing back.

TheCPUWizard
December 27th, 2008, 10:54 PM
Of course, but if you review the thread, you'll see that I initially suggested using an existing implementation, and you replied by saying "Or just use AJAX components with .NET 3.5......". I took that to mean that you thought there was an easy way to do it without using a 3rd-party implementation. That's why I was pushing back.

I couldn't find it when I first posted (but I knew it existed, becuase I used it as the basis for my own...

http://www.codeproject.com/KB/ajax/AJAX_Progress_BAR.aspx

This is a full AJAX implementation with an HttpModule. It should eliminate( (or drastically reduce) the implementation integration. Source is included along with explaination...

brettle
December 27th, 2008, 11:51 PM
I couldn't find it when I first posted (but I knew it existed, becuase I used it as the basis for my own...

http://www.codeproject.com/KB/ajax/AJAX_Progress_BAR.aspx

This is a full AJAX implementation with an HttpModule. It should eliminate( (or drastically reduce) the implementation integration. Source is included along with explaination...

That article does not include source for the HttpModule, is very poorly rated (1 out of 5), and has nothing but negative feedback. It appears to be just a teaser for UpFilesBE from expandata.net. UpFilesBE is only free for personal use, and runs $999 for a single server commercial license. The first codeproject article seems like a better fit to the original poster's requirements.

Anyway, it sounds like you are saying that your first post should have said something closer to "Or you could check out these codeproject articles: ...". Assuming that's the case, I'm happy to leave it at that.

toraj58
December 28th, 2008, 11:17 AM
@TheCPUWizard: the last codeproject article you suggested is not cross-browser compatible.
@brettle: thanks for offering your opensource project to me.