Try This :
<script type="text/javascript">
function validate()
{
if(document.getElementById("<%=txt1.ClientID %>").value=="")
{
alert("Please Enter Textbox Value");
document.getElementById("<%=txt1.ClientID %>").focus();
return false;
}
}
</script>
And call on Button OnClientClick Event :
<asp:button id="btn1" runat="server" text="Click Here For Validation" onclientclick="return validate()" xmlns:asp="#unknown" />
if any problem you got, please post it....