hi,
I am using .net 1.1 version.
The problem is i have used one datagrid which contains some data columns and one checkbox column.
Datagrid contains nearly 50 records and 50 checkboxes.(i.e) each record contains checkbox.
below the datagrid an image button is placed.if i didn't select any checkboxes and click on the image button it should tell please select any two checkboxes for compare.
but i am using .net 1.1 so please any one help me....
i need the javascript code for how to check whether the checkbox is checked or not...
Regards,
Prakash
How to check the chekbox in a datagrid is checked or not
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Raghavendra URank #1,371 · 1.2K reputationPosted Aug 14, 2009, 1:12 AM EDT
Master BillaRank #2,229 · 630 reputationPosted Aug 14, 2009, 1:22 AM EDT
You need use the JAVA script to this
<script type="text/javascript">
function SelectAll(id) {
var frm = document.forms[0];
for (i=0;i
if (frm.elements[i].type == "checkbox") {
if(document.getElementById(id).checked==true)
{
alert(document.getElementById(id).value);
}
}
}
script>
just more details here
http://wiki.asp.net/page.aspx/281/check-uncheck-checkboxes-in-gridview-using-javascript/
thank you