Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 910503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:03:20+00:00 2026-05-15T17:03:20+00:00

I am using jquery ajaxupload plugin to upload files .I have the following js

  • 0

I am using jquery ajaxupload plugin to upload files .I have the following js on my default.aspx page

 $(document).ready(function() {
        /* Example 1 */
        var button = $('#button1'), interval;
        new AjaxUpload(button, {
            action: 'upload.aspx',
            name: 'myfile',
            responseType:'json',
            onSubmit: function(file, ext) {
                // change button text, when user selects file
                button.text('Uploading');
                // If you want to allow uploading only 1 file at time,
                // you can disable upload button
                this.disable();
                // Uploding -> Uploading. -> Uploading...
                interval = window.setInterval(function() {
                    var text = button.text();
                    if (text.length < 13) {
                        button.text(text + '.');
                    } else {
                        button.text('Uploading');
                    }
                }, 200);
            },
            onComplete: function(file, response) {               
                button.text('Upload');
                window.clearInterval(interval);
                // enable upload button
                this.enable();
                // add file to the list
                $('<li></li>').appendTo('#example1 .files').text(file);
            }
        });
    }); /*]]>*/</script>    

the above js will invoke upload.aspx.cs page load.I am expecting a json response from upload.aspx.But I do not understand how do I return a response from page load.I have also tried modifying the ‘action’ attribute to ‘upload.aspx/getdata’, where ‘getdata’ is a method/webmethod,but I still see the page load getting invoked and not the method/webmethod.

Could someone please help me in getting a response(such as upload status(success/fail) in json) and presenting it to the UI?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:03:20+00:00Added an answer on May 15, 2026 at 5:03 pm

    .

    Response.ContentType = "application/json";  
    Response.Write(@"{""Name1"":""FirstValue"", ""Name2"":""SecondValue""}");
    

    or in your case:

    Response.Write(@"{""Status"":""Success""}");
    

    The upload.aspx page itself should be completely empty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently using Valums JQuery File Upload plugin. The plugin is very convenient
I'm using the jQuery plugin ajaxForm to submit a file upload form via AJAX.
I'm using the following JQUERY Plug-in to upload ideas: http://valums.com/ajax-upload/ For some reason I'm
Using jQuery, how would you find elements which have a particular style (eg: float:
I'm using the AJAX plugin from Andris Valums: AJAX Upload ( http://valums.com/ajax-upload/ ) Copyright
I've been using the jQuery address plugin to enable back-button support, which has been
I have part of a page being dynamically refreshed via the jQuery load() method,
Using jquery (javascript) need to display facebook user name in html page using facebook
Using jQuery , how can I dynamically set the size attribute of a select
Using jQuery, how do you bind a click event to a table cell (below,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.