Javascript 使用Jquery绑定asp:CheckBoxList中的数据

Javascript 使用Jquery绑定asp:CheckBoxList中的数据,javascript,jquery,asp.net,Javascript,Jquery,Asp.net,我有一个asp:checkbox列表控件 <asp:CheckBoxList ID="chkProperty" runat="server"> </asp:CheckBoxList> 我尝试将联系人姓名绑定为文本,将客户id绑定为chekbox列表的值。但是没有显示任何内容如果我没有错,请尝试这样做 <asp:CheckBoxList ID="CheckBoxList1" runat="server"> </asp:CheckBoxList&g

我有一个asp:checkbox列表控件

<asp:CheckBoxList ID="chkProperty" runat="server"> </asp:CheckBoxList>

我尝试将联系人姓名绑定为文本,将客户id绑定为chekbox列表的值。但是没有显示任何内容

如果我没有错,请尝试这样做

<asp:CheckBoxList ID="CheckBoxList1" runat="server">
    </asp:CheckBoxList>
<asp:Button runat="server" OnClick="FillCheckBox"></asp:Button>
使用它,您可以将数据绑定到checkboxlist。让我知道结果

   objXML_RegionData.setProperty("SelectionLanguage", "XPath");
    xpath = "//Name";
    result = objXML_RegionData.selectNodes(xpath);
    var row = $("[id*=chkProperty] tr:last-child").clone(true);
    $("[id*=chkProperty] tr").remove();
    $.each(result , function () {
        var customer = $(this);
        $("input", row).val($(this).attr("CustomerID"));
        $("label", row).html($(this).attr("ContactName"));
        $("[id*=chkProperty] tbody").append(row);
        row = $("[id*=chkProperty] tr:last-child").clone(true);
    });
<asp:CheckBoxList ID="CheckBoxList1" runat="server">
    </asp:CheckBoxList>
<asp:Button runat="server" OnClick="FillCheckBox"></asp:Button>
 protected void FillCheckBox(object sender, EventArgs e)
{
    CheckBoxList1.Items.Add("Dummy data 1");
    CheckBoxList1.Items.Add("Dummy data 2");
}