I would recomend using a customervalidator control to handle that situation if you just want a quick and easy solution that doesn't involve creating new server controls.
add a customer validator to the page where ever you would like it to display and set its properties like you would any other validator control with three exceptions
1) Do not assign it a ControlToValidate property. This way it will not be coupled with any specific control
2) assign the ClientScript property to an arbitary javascript function you have added to the page. for instance
function myClientValidate(source, arguments)
{
arguments.IsValid = true;
with (document.Form1)
{
if (textbox1.value.length < 1 && textbox2.value.length < 1) arguments.IsValid = false;
}
return;
}
3) Assign the OnServerValidate property of the validator to an appropriate serverside script function so that it still evaluates on postback as well