Client side code:
<script type="text/javascript">
function CallMe()
{
var x= document.getElementById("id of textbox").value;
if(x=="" || x==null)
{
alert("Some stuffs are missing");
}
}
</script>
Then you can call this Javascript code from your C# code behind as below:
protected void button_click(object sender, EventArgs e)
{
Page.RegisterStartupScript(this.GetType(),"alert","CallMe();",true);
}
Hope it helps.
-Anurag