here is java script code
function ShowMsg()
{
if(document.getElementById("txtVerifierName").value=="")
{
alert("PLEASE ENTER VERIFIER NAME..");
return false;
}
<asp:Button ID="btnAdd" runat="server" Text="ADD" OnClientClick="ShowMsg()" onclick="btnAdd_Click" />
NOW THE PROBLEM IS THAT WHEN I CLICK THE BUTTON, IT SHOWS THE MESSAGE THAT PLEASE ENTER VERIFIER NAME BUT EXECUTION DOESN'T STOP THERE, AFTER SHOWING MESSAGE IT EXECUTES btnAdd_Click AND THIS BUTTON CONTAINS CODE FOR THE INSERT QUERY. SIMPLE WHAT I WANT TO DO IS, IF VERIFIER TEXTBOX IS EMPTY IT SHOULD SHOW THE MESSAGE ON CLIENT SIDE AND DON'T INSERT RECORD, OTHERWISE EXECUTE INSERT QUERY.PLZZZ HELP