You must Sign In to post a response.
  • Category: JQuery

    How to get data from database and bind to checklistbox using jquery

    hi folk,

    i want to get data from database and bind to checklistbox with count also ..

    please share some link or some code

    thank you in advance

    abhijit patil
  • #763695
    Hi Abjit,

    For getting database records and shows the same in our control using Jquery then we have one simplest way is using AJAX call, how to call database data using AJAX call? for that we need to create webmethod and using below code we can able to retrieve the webmethod.

    $(function () {
    type: "POST",
    url: "PageName.aspx/WebMethod",
    data: '{}',
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: your action,
    failure: function (response) {
    //failure case
    error: function (response) {
    //error case

    you can get your webmethod using URL showed in above script, if you want to know how to achieve this with simple example, then I suggest you to refer below link here they will explain you how to do the same, ""

    Hope this will helpful to you...

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #763794
    Hai Abhijit Patil,
    There is very popular client side method $.Ajax to call a server side method to get the data from the database, asynchronously.
    So you can make use of this method. Once you get the data you can use the code to fill the checklistbox as below:

    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

Sign In to post your comments