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

    Get Selected in CheckListbox


    I want to know, how to get the selected values from CheckListBox in Client side(javascript).

    I'm binding the dataset with Name and ID (Name is text field and ID is values), by using the javascript need to get the value ID if Name is selected in CheckListBox.

    Simply need to get the selected values from CheckListBox, but i tried i got the result of Selected Text only javascript but i need the value.

  • #761158
    Hello Sathish,

    Refer the below code :

    <script type = "text/javascript">

    function GetCheckBoxListValues(chkBoxID)
    var chkBox = document.getElementById('<%= checkboxlist1.ClientID %>');
    var options = chkBox.getElementsByTagName('input');
    var listOfSpans = chkBox.getElementsByTagName('span');
    for (var i = 0; i < options.length; i++)


    Hope this will solve your problem.

    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • #761174

    Refer below sample

    var checkedDs = document.getElementById('<%=chkSpecialPackNA.ClientID%>').checked;

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

    Blog :

Sign In to post your comments