You can use following javascript function:
function Matchvalues()
{
var value1 = document.getElementById('TextBox1').value;
var value2 = parseInt(document.getElementById('TextBox2').value) +
parseInt(document.getElementById('TextBox3').value) +
parseInt(document.getElementById('TextBox4').value);
if (value1 != value2) {
alert('value in 1st TextBox and sum of Textbox2,Textbox3,Textbox4 are not matched');
return false;
}
else {
alert('value in 1st TextBox and sum of Textbox2,Textbox3,Textbox4 are matched');
return true;
}
}
call this function on OnClientClick event of a button.
Regards,
Bhushan Shah