Getting Uploadify Working in C#

This seemed like it should be easy, but I have had trouble getting it to work. I don’t know why it doesn’t. It is just showing the normal file input.

Is there any code / examples to get this working. I am getting frustrated…

Thank you all.


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

This is a video tutorial on how to get started using C# and Webforms, should help you.

Can you post your code though so that I might be able to show you what you are doing wrong?

Here is the sample code I have for

<script type="text/javascript">
       // <![CDATA[
       var id = "55";
       var theString = "asdf";
       $(document).ready(function() {
       'uploader': 'uploadify/uploadify.swf',
       'script': 'Upload.ashx',
       'scriptData': { 'id': id, 'foo': theString},
       'cancelImg': 'uploadify/cancel.png',
       'auto': true,
       'multi': true,
       'fileDesc': 'Image Files',
       'fileExt': '*.jpg;*.png;*.gif;*.bmp;*.jpeg',
       'queueSizeLimit': 90,
       'sizeLimit': 4000000,
       'buttonText': 'Choose Images',
       'folder': '/uploads',
       'onAllComplete': function(event, queueID, fileObj, response, data) {

   // ]]></script>

   <input id="fileInput" name="fileInput" type="file" />

Then you want to make a Handler (.ashx):
public class Upload : IHttpHandler, IRequiresSessionState

    public void ProcessRequest(HttpContext context)
            HttpPostedFile file= context.Request.Files["Filedata"];

            int id = (Int32.Parse(context.Request["id"]));
            string foo = context.Request["foo"];
            file.SaveAs("C:\" + id.ToString() + foo + file.FileName);

        catch(Exception ex)

Post your code and I will take a look at it. Sounds like you are pointing to a resource that doesn’t exist. Maybe your ‘uploader’ property is not pointed to the proper resource or your jquery link is broken (or not there).

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x