<asp:ImageButton ID="removeButton" runat="server" OnClick="removeStudentInformation" OnClientClick="return checkBoxselectedornot()" ImageUrl="~/image/remove-selected-button.png" />
function checkBoxselectedornot() { var valid = false; var gridview = document.getElementById("studentInformationGrid"); for (var i = 0; i < gridview.all.length; i++) { var node = gridview.all[i]; if (node != null && node.type == "checkbox" && node.checked) { valid = true; break; } } if (!valid) { alert("Invalid. Please select a student to continue."); } return valid; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)