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

  • SEARCH
  • Home
  • 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 7908047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:44:31+00:00 2026-06-03T11:44:31+00:00

I am using Uploadify with ASP.Net 4.0 and a Generic Handler for the backend.

  • 0

I am using Uploadify with ASP.Net 4.0 and a Generic Handler for the backend.
now I could use the scriptData part of Uploadify If I only knew how to read the JSon that is being posted to the Generic Handler so instead I opted for just sending the needed data through querystring which I have tested by hardcoding the query string and it works but when I try to get the value of a checkbox using the val() option it just passes the value of “on” no matter if the check box is or is not checked. I have also tried simply using $(‘#mainimg’).is(‘:checked’) which does not give me anything.

            $('#file_upload').uploadify({

            'uploader': '/uploadify/uploadify.swf',
            'script': '/services/Upload.ashx?ismain=' + $('#mainimg').val(), <--- HERE IS THE PROBLEM
            'multi': false,
            'fileExt': '*.jpg;*.gif;*.png',
            'sizeLimit': 10000000,
            'scriptAccess': 'sameDomain',
            'cancelImg': '/uploadify/cancel.png',
            'onAllComplete': function (event, data) {
                alert(data.filesUploaded + ' files uploaded successfully!');
            },
            'onCancel': function (event, ID, fileObj, data) {
                alert('The upload of ' + fileObj.name + ' has been canceled!');
            },
            'onError': function (event, ID, fileObj, errorObj) {
                alert(errorObj.type + ' Error: ' + errorObj.info);
            },
            'onSelectOnce': function (event, data) {
                alert(data.filesSelected + ' files were selected for upload.');
            },
            'auto': true

        });

I’ve set the value of the checkbox using this

$('#mainimg').click(function () {

                        if ($('#mainimg').is(':checked')) {
                            $('#mainimg').val('true');
                        }
                        else { $('#mainimg').val('false'); }
                        alert($('#mainimg').val());
                    });

I have even tried setting a variable using this code

$('#mainimg').click(function () {

                        if ($('#mainimg').is(':checked')) {
                            checkboxStatus = false; ;
                        }
                        else { checkboxStatus = true; }
                        alert(checkboxStatus);
                    });

But even though I would test it with an alert and it shows the right data in the alert when it goes to the uploadify script it just provides the value of ‘false’

can anyone see what it is that I am doing wrong here?

  • 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-06-03T11:44:33+00:00Added an answer on June 3, 2026 at 11:44 am

    You are right that the value for the checkbox is always “on”, so you have to send something else if the checkbox is checked, i.e. the text of the checkbox, or its label’s value.

    (...)'script': '/services/Upload.ashx?ismain=' + $('#mainimg').is(':checked')?'true':'false',
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Uploadify to upload some images with ASP.NET. I use Response.WriteFile() in ASP.NET
I am uploading a file in my ASP.NET MVC application using Uploadify. Controller: public
I am using Uploadify/asp.net mvc 3 to upload images. Is it possible to display
I am using Uploadify v2.1.4 to upload images using ASP.Net C# FM 4.0. In
I am using Uploadify plugin for asp.net web appication. I want to let user
I am using Uploadify to upload multiple files in my ASP.NET MVC application. In
I'm using the Yahoo Uploader, part of the Yahoo UI Library, on my ASP.Net
I am using uploadify along with ASP.NET to upload files to my server. At
Consider an ASP.NET page using the jQuery library Uploadify . Here is the sequence
I am trying to implement the checkscript feature of uploadify in an asp.net mvc

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.