Instead of going to validate with custom JavaScript and alert boxes, try to reuse the standard ASP.net validation controls. There are a bunch of them available for required fields, comparison validators, custom validators etc. The advantage is that you use standard mechanisms and that you can access them for doing server-side as well as client-side validation. The server-side validation is important if your user has JavaScript disabled in his browser which still seems to happen.
Moreover I actually prefer that things happen directly on the page and not with alert boxes (this is somehow the old way of doing things). Alert boxes lower the user experience since he continuously has to click it away and moreover he has to read what happened, while if the error is shown directly beneath its source makes it easier to see (just from a usability point of view).
You could alternatively also look at the jQuery validation mechanism. As far as I know there exists one.