On Button's
OnClientClick
Event, call one
JavaScript
function.
<asp:Button OnClientClick="return validate()" runat="server"></asp:Button>
Inside that function, check if
TextBox
contains data or not by
JavaScript
document.getElementById()
or
jQuery $
selector.
function validate()
{
var yourTextbox = document.getElementById("textBoxId");
if(yourTextbox.value == null || yourTextbox.value == "")
{
return false;
}
else
{
return true;
}
}