how to make an checkboxlist select only one item selected

asp.net, jquery

Solution

If the user is only allowed to select one item from a list, you should use radio buttons instead of checkboxes.

UPDATE:

If you have to use checkboxes then you can use the following code:

$("#myform :checkbox").click(function(){
  $("#myform input:checked").attr("checked","");
  $(this).attr("checked","checked");
});

Problem

i am using an checkboslist binding to a datatable. but here i need to make user select only one item selected from checkbox list is there way we can aachive this either JQuery, javascript, c# thank you

Original source