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 369921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:58:05+00:00 2026-05-12T13:58:05+00:00

I have a form which, for the sake of isolating the problem, has about

  • 0

I have a form which, for the sake of isolating the problem, has about a dozen plain HTML checkboxes (not WebControls), all of which are disabled. They are inside an UpdatePanel.

I have a link which calls

__doPostBack('a-control','my-custom-argument');

Depending on the first argument I supply, the page may do a full postback or a partial one.

When I do a full postback, none of the checkbox values are submitted in the post (because they are disabled). This is the normal and thus desired behavior.

However, when it does a partial postback, the script collects all of the values from my checkboxes and submits them, without indicating which ones were disabled, which breaks my code.

It’s annoying and I would like it to behave consistently. Is there anyway to tell the .NET javascript handler to work the way the rest of the world does and not postback the values of disabled HTML form elements?

  • 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-12T13:58:05+00:00Added an answer on May 12, 2026 at 1:58 pm

    I can suggest two options:

    1) You can remove the name attribute of disabled controls with JavaScript just before doing postback.

    2) Override Sys.WebForms.PageRequestManager.getInstance()._onFormSubmit with corrected version of code. Just copy implementation from MicrosoftAjaxWebForms.debug.js, add a handling for the disabled attribute and attach the corrected function to the existing PageRequestManager object:

    Sys.WebForms.PageRequestManager.getInstance()._onFormSubmit = function…

    Then register this JS block as startup script. It’s important to get a correct order of rendered script blocks. I do a similar thing in my subclass of ScriptManager:

    protected override void OnResolveScriptReference(ScriptReferenceEventArgs e) {
        base.OnResolveScriptReference(e);
    
        if (e.Script.Name.StartsWith("MicrosoftAjax"))
            Page.ClientScript.RegisterStartupScript(GetType(), "My patch", MyPatchJs, true);
    }
    

    Works like a charm!

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

Sidebar

Related Questions

No related questions found

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.