Ajax File uploader - asp.net

I just wanted to ask a question about uploading files via AJAX. I have researched on the web and found many articles on doing this. I am using ASP.NET 2.0.
I am probably going to go the jQuery route on this one, but I'm still unsure, I just need some feedback. Bacause my aim is to create an admin page for my client to add new products to his site when my client wishes to, so my client wants a simple file uploader and a multiple file uploader.
The first question is which is the best AJAX File Uploader to use?
The second question is how many files can you upload via AjAX, are there limits to how much you upload with different techniques ie. using jQuery or SWFUpload or using IHTTPHandler?
I would be grateful for your feedback.
Thanks.

I actually had to do this for an item here at work. To keep things rather simple, I went old-school and used a hidden iframe to do the file transfer in the background. There may be more fancy ways, but this worked for me. Also, there's no headaches when Adobe pushes out a bad update.
It was a while ago, so I can't remember the nuts n' bolts of the top of my head, but here's an article that seems to be using the same idea:
http://www.openjs.com/articles/ajax/ajax_file_upload/

This is a subjective question, as there is no one solution fits all for your application. The right answer is the uploader that meets your business needs. Limitations, if they exist, are set per whatever component you decide to use.

Related

Creating an image handler in Visual Basic for Ajax file upload

I'm not asking for detailed code for this question, but rather solid direction to learn how to do it myself. There appears to be many methods and directions so just looking for a headstart from someone experienced.
I have a simple file upload control. I want it to operate as an ajax upload, no page-refresh, and if I'm understanding correctly I need http handler that grabs the image and deals with it behind the scenes.
So I need to create a custom control, a new file upload that allows me to set some properties, such as... Path for the image, prefix for three different types (I.e. thm_uniqueimagename.jpg, med_uniqueimagename.jpg, lg_uniqueimagename.jpg) and an option to either KeepOriginal="True/False".
I'd like to see a progress bar while the image is uploading as well. A fantastic example would be a post on Facebook and how you can upload an image.
Right now I'm stuck with a standard upload control that has full post-back/refresh and it's just not nearly as attractive.
I'm just now learning VB... So basically if you can say... Read this tutorial, then do this, then do this... that would be greatly helpful. Just overwhelmed with what to do first, and how to put it all together.
Platform: Windows, .net, etc.
Thank you for any advice.
If you want a better user experience, then I suggest you investigate some solutions like the following:
ASP.NET AJAX file upload
AjaxFileUpload.
Note: If you read the documentation for the ASP.NET AJAX AjaxFileUploader, it says that it requires HTML5 for the progress feedback; otherwise it shows a spinner. So if progress feedback is a necessity and you cannot fully support HTML5 in your target browsers (i.e. older versions of IE; IE6, IE7, IE8, etc.), then you should look into the options below.
Custom HTTP module
NeatUpload is a free option.
Silverlight/Flash option
SWFUpload is a free option.
Asynchronous chunking option
RadAsyncUpload - Telerik's ASP.NET AsyncUpload is a pay option, check website for pricing.

how to config SlickUpload 6 AJAX to NOT require a file

I've been trying to figure out how to make the current SlickUpload 6.1.7 play nice in a form that does not require someone to include files. We want it to be optional. This form is for people to contact us, and we want to give them the option to include attachments, just not require it. It works if you upload a file, however the form will not submit, if you do not upload any file.
We are trying to use the Ajax version with Memory stream, but the 'AspNetAjaxCs-VS2010' sample code is not helping much... the documentation is sparse, and the samples have little constancy between them, making it hard to understand how exactly it all works. (at least for me) The fact that they got bought out, and the new owner company pretty much ignores people unless they are paying for it, is not cool.
Any ideas?
You could use a div to detect a drop inside your page. That way you could only activate it when the user really need it, or whenever the using actually select something for uploading, like a trigger.
I'm not sure I understand your question, but if so, it sounds like you already have a form that you want to use SlickUpload with to upload files IF there are files to be uploaded. Are you using the CustomUploadStreamProvider form?

asp.net: dynamically extend content

i'm not sure how to call that. i'm looking for some samples guiding me how to implement a automatic page extend. i'm mean something like the friends list on facebook. first only a few friends are loaded. after you scroll down, some others get loaded.
thx in advance
The solution to your problem relies more on AJAX then anything else.
I suggest using jQuery Ajax, and here is a nice article that will get you started with calling ASP.NET web services via client side script.
enter link description here
If you don't have experience using ajax this will probably be a lot for you to grasp. Especially if you're going to dive in with a feature like you described above.
Edit: It may be more practical to use a plugin to achieve this:
scrolling jQuery plugin

Customizing GraffitiCMS

I downloaded GraffitiCMS the other day(now open source and free), and like a lot of what I see, but what I really want to use it for, is to add CMS capabilities to an existing asp.net database/application.
Without getting bogged down with all the details of my app, can someone give me the basic 'approach' that should be taken to add custom content to Graffiti; content that won't be a 'post'?
I've seen for example, how to add custom-widgets to Graffiti - basically inherit from the widget class, compile your dll and plop it into the correct directory and it becomes part of the system. Is there a way to do something similar for the main content areas?
For simplicity sake, pretend I have a non-graffiti database with gig's of data that I want to display on the website using standard asp.net grid's and forms. I realize I could just go in and hack apart the source code to integrate my existing app, but that is likely not the correct approach.
Not looking for a complete solution her, just a pointer and what areas to investigate...thanks.
If you check out the latest source of Graffiti (or the 1.3 branch that was recently created), support was added to put widgets anywhere you want on any page. There is a new chalk function - $macros.Widget - that provides you with this ability. Dan Hounshell wrote a blog post on how you can use this new functionality:
http://danhounshell.com/blog/graffiti-cms-1-3-add-a-widget-anywhere-in-a-view-with-new-widget-macro/
If you're looking for something different than that, just let me know - we're working to make Graffiti even better for situations just like you are currently in.
What we have done to be able to integrate Graffiti CMS with our current ASP.NET projects is to create a post in Graffiti called "hidden" and then with our standard .ASPX pages we call a class in our Render Override that pulls the "hidden" post (ie: site.com/hidden/) and uses the header and footer to wrap the Graffiti theme around our custom .ASPX page. We use some HTML comments in the "hidden" post to be able to parse the header and the footer. It is kind of a hack, but has worked out really well for us.
I think you're trying to put the cart before the horse - depending on the size and amount of functionality, I would be looking to rebuild it after learning the development platform of my CMS system of choice.
I'm pretty much in the same boat right now. I have avoided Graffiti because I have to learn "Chalk" (whatever that is) and Umbraco (using XSLT for layouts is retarded). So far, this leaves me with Sitefinity at the top of my list and Telerik have just pulled the free version!
I may end up grabbing a very basic CMS which is easier to customize. I know this doesn't directly answer your question, but it may give you some food for thought :-)

Multiple file uploader - looking at Google Docs implementation

I'm looking to implement a multiple file uploader in my ASP.NET 3.5 site.
Now, the Google Docs multi-file uploader is pretty awesome, and I'd like to create something like that. Correct me if I'm wrong, but Google Docs is not open source, so I can't get my hands on the source code for it.
Any ideas on how this is implemented, or the best way of creating a nice interactive multi-file uploader like it?
I strongly suggest you give this jquery file upload plugin a try: "uploadify". It makes it super easy to integrate such a feature.
Nice and interactive : you can build a Silverlight client to send your files to webserver. It allows to select multiple files at once.
I guess 'Zhaph - Ben Duguid' had the best answer for this one. Post it as an answer and I'll accept it!
GoogleDocs uses a combination of Flash and JS, with the bulk of the work happening in the Flash object, rather than the JS, and they heavily minify their JS to make it smaller to download, and also harder to read...

Resources