hai all i wrote this sample code for selecting check boxes in check box list my view is
for this i did like first i bind the tablle and attached to list
@{
List listcheck = new List();
foreach (DataRow row in dtcheck.Rows)
{
//listcheck.Add(new SelectListItem { Value = row["RoleID"].ToString(), Text = row["RoleName"].ToString() });
@row["RoleName"]
}
}
and after
$(document).ready(function () {
alert("Document ready");
//$("#somebutton").on("click", function () {
// alert("clicked");
// var v = $("#checked").val();
// var v = $('input[name=selected]:checked').val();
// alert(v);
//});
$('#checked').multiselect({
includeSelectAllOption: true
});
$("#somebutton").on("click", function () {
alert("button clicked");
alert($('#checked').val());
})
});
the commented jquey is working however the one which i need in that not even button cick is not working can any one help me
Thanks and Regards
aditya immadiPosted Oct 25, 2016, 3:32 AM
Midhun TpPosted Oct 25, 2016, 3:19 AM
http://sampathloku.blogspot.in/2013/06/how-to-use-checkboxlistfor-with-aspnet.html