Click here to Skip to main content
13,095,921 members (53,743 online)
Rate this:
Please Sign up or sign in to vote.
Hi...anyone can help on how to Bind the radio button list via Javascript or JQuery?
Data is array list return from Json and webservice.

         type: "POST",
         url: "../../Webservice/Control.asmx/getIdea",
         data: "{'D':'" + HP + "'}",
         contentType: "application/json",
         dataType: "json",
         success: function (data) {
         for (var i = 0; i < data.d.length; i++) {
           AddListItems(rblIdea, data.d[i].MGrpT, data.d[i].MGrpV);    
               failure: function (response) {
Posted 6-Oct-11 0:34am
Updated 6-Oct-11 1:17am
Not Active10.2K

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

ASP.NET 4.0 has the ability to do client-side data binding Data Binding in ASP.NET AJAX 4.0[^]

If you are not using 4.0, then it is simply a matter of iterating through your array and appending html elements to the container

$("#mySelect").append("<option>" + some value + "</option>");[^]
cindy_03 7-Oct-11 22:12pm
Thanks for your answer..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 6 Oct 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100