say for example your button id is btnSubmit
and the name of the datatable is dtTestTable then the code in the code behind will be
if(dtTestTable != null )
{
btnSubmit.CausesValidation = false;
}
else
{
btnSubmit.CausesValidation = true;
}
cheers... :)
if this solves your problem mark it as answered