In your case, pagers are generated by ASP.NET, so you can't do much server-side. You have to run a client-side script which, in steps: 1-Finds the pager anchors 2-replace (and store) their href with an onclick function 3-create your validation function that, if successfull, calls the original stored function "__doPostBack".
That's not so complicated if you get the help of client-side tools like Firebug or Chrome developer tools.