I have several checkboxes inside an UpdatePanel of asp.net
Let's say, I have 3 checkboxes in that panel. Each time, one checkbox is checked, the previous checked checkbox will be unchecked.
I have tried like this:
<asp:CheckBox ID="CheckBoxExport1" CssClass="checkboxSingle" />
<asp:CheckBox ID="CheckBoxExport1" CssClass="checkboxSingle" />
<asp:CheckBox ID="CheckBoxExport1" CssClass="checkboxSingle" />
In js:
$('.checkboxSingle').live('click', function (e) {
if ($(this).is(':checked')) {
$(".checkboxSingle").attr('checked', false);
$(this).attr('checked', 'checked')
}
});
The click is function but the rest does not.
<asp:RadioButton>? Also, in ASP, shouldn't the value of thechecked-attribute betrueinstead ofchecked?