<p class="help-block" id="lblSpecialityErr" style="color: Red;">
and this is the js to bind data from database.
function BindSpecialityType() {
$.ajax({
type: "POST",
url: "MRRegistration.aspx/GetSpeciality",
data: {},
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
var objdata = $.parseJSON(response.d);
BindSpecialityCheckBoxList('chkbxSpeciality', objdata);
}
});
}
function BindSpecialityCheckBoxList(target, data) {
var table = $('<table></table>');
var counter = 0;
$(data).each(function () {
table.append($('<tr></tr>').append($('<td></td>').append($('<input>').attr({
type: 'checkbox', name: 'chklistitem', value: this.SPECIALITYID , id: target + counter
})).append(
$('<label>').attr({
for: 'chklistitem' + counter++
}).text(this.SPECIALITYNAME ))));
});
}
but i am not able to bind. Please help