programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Monday, August 25, 2014

Bind CheckBoxlist from database using jQuery

Binding CheckBoxlist from database using jQuery:

JQuery is lightweight client side library that provide many functions to developer to perform operations within code. BY the Using Jquery some time we get fast and better look of web page.
Here we give a simple code for explain jquery. In programming jQuery is a very fast, feature-rich and small JavaScript library. 

JQuery message on web page:

<script language="javascript">
    $(document).ready(function () {
        $('#btn').click(function () {
            alert('Hello JQuery');

JQuery Related Post on this tutorial:

Example of JQuery on web page:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="myJQuerypage.aspx.cs" Inherits="JQuerymypage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<!DOCTYPE html>
<script type="text/jscript" src="//">
    function myFun() {
        $("#h01").attr("style", "color:red").html("Hello ........user ")
<h1 id="h1"></h1>
</html> CheckBox list from database by jQuery:

<script type="text/javascript" language="javascript">
        function CheckBoxList() {
                type: "POST",
                url: "CheckBoxList.aspx/GetCheckBoxDetails",
                contentType: "application/json; charset=utf-8",
                data: "{}",
                dataType: "json",
                success: AjaxSucceeded,
                error: AjaxFailed
        function Succeeded(result) {
        function Failed(result) {
            alert('Failed to load checkbox list');
        function BindCheckBoxList(result) {

            var items = JSON.parse(result.d);
        function CreateCheckBoxList(checkboxlistItems) {
            var table = $('<table></table>');
            var counter = 0;
            $(checkboxlistItems).each(function () {
                    type: 'checkbox', name: 'chklistitem', value: this.Value, id: 'chklistitem' + counter
                    for: 'chklistitem' + counter++

CheckBoxlist from database using jQuery
Bind CheckBoxlist from database using jQuery


  1. I have read your blog and I gathered some needful information from your blog. Keep update your blog. Awaiting for your next update. Thanks

  2. Great. It is good to constantly coming up with creative ideas. Provides much needed knowledge. goal oriented blog posts and always tried to find creative ways to meet goals.

    Online affiliates