I am trying JoshStodola hidden field suggestion, but I can't seem to get the javascript to work. The script is below: function PrimeKeyCheck(sender, args) { var numberOfRecords; var hiddenField = document.getElementById("NumOfRecordsHiddenField"); numberOfRecords = parseInt(hiddenField...