JavaScript validation provides the functionality to validate the number of GridView checkboxes selected by the user. You can store the number of selected checkboxes in an ASP.Net HiddenField control and display the JavaScript alert message box if value of HiddenField exceeds the limit. Click event of checkbox control can be used to set the value in ASP.Net HiddenField control to validate the number of GridView checkbox selection.