u can use javascript
<script type="text/javascript">
function CalculateBMI() {
var Weight = parseFloat(document.getElementById('<%=txtWeigh %>').value);
var Height = parseFloat(document.getElementById('<%=txtHeight %>').value);
if (!isNaN(Weight) && !isNaN(Height)) {
var Ms = parseFloat((Height) / 100);
document.getElementById('<%lblBmi%>').value = parseFloat((Weight) / (Ms * Ms));
return false;
}
else {
document.getElementById('<%lblBmi%%>').value = "";
return false;
}
}
</script>;
these are ur textboxes to call javascript method
<asp:TextBox ID="txtWeight" runat="server"
onkeyup="CheckFirstChar1(this);CalculateBMI();"
></asp:TextBox>
<asp:TextBox ID="txtHeight" runat="server"
onkeyup="CheckFirstChar1(this);CalculateBMI();"
></asp:TextBox>
Accept as answer if solve you problem.