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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:23:17+00:00 2026-05-21T05:23:17+00:00

I have two checkboxlists on a page – Parent and Child. Both are in

  • 0

I have two checkboxlists on a page – Parent and Child. Both are in seperate collapsable divs. When the Parent’s div collapses I use jquery to call a WebMethod that executes a query on the database, serializes the returned List to json, and returns it to the jquery method.

The above all works very well and I am able to successfully get the expected json string.

What I would like to do now is to populate the Child checkboxlist based on that json data. Preferrably, I would like to be able to set the text and value as well (the DataTextField and DateValueField properties of the checkboxlist).

Can anyone provide examples of how to do this?

   function RunCentralEffect() {
        $("#ParentDiv").hide('blind', 200);
        var names = [];
        $('#ParentDiv input:checked').each(function () {
            names.push(this.value);
        });
        $.ajax({
            type: "POST",
            url: "BranchReportForm.aspx/MyWebMethod",
            data: "{'args': '" + names + "'}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (msg) {
                alert('Success!');
                //Now what?
            }
        });
    }

Thank you!

  • 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-21T05:23:17+00:00Added an answer on May 21, 2026 at 5:23 am

    When you are talking about ChecbkboxList controls, DataValueField and DataTextField properties you are referring to ASP.NET abstractions which your jQuery methods will have no knowledge of as these are handled in your codebehind which generates the HTML that is sent to the browser.
    What you are going to have to do is manipulate the DOM elements directly. Without knowing a bit more about the actual html layout that is generated by your code it is tricky to provide more of an answer but at a high level you will need to loop through your returned json objects and append a new checkbox and label into the appropriate div.

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

Sidebar

Related Questions

I have two radiobuttonlist and one checkboxlist on the page. Ideally based on the
So I have trouble trying to use any of these two elements for different
Have two fields start and end, both are dates, I want to write a
I have two servers: production and testing. Both of them run PostgreSQL. I made
I have two pages load at beginning, login page and register page. Register page
I have two CheckBoxLists and I need to be able to set the ListItems
Have two variables both containing integers: var input; var value; Need to perform arithmetic
I have two convex polygons in 3D. They are both flat on different planes,
i am using asp.net c# jquery vs 2008 I have two check box list
Have two folders with approx. 150 java property files. In a shell script, how

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.