Hi Ramco,
Please refer below sample.
HTML
<table>
<tr>
<td>Balance to be paid:</td>
<td><asp:TextBox runat="server" ID="txtBalanceToBePaid" AutoPostBack="true" OnTextChanged="OnChanged" /></td>
</tr>
<tr>
<td>Balance to paid:</td>
<td><asp:TextBox runat="server" ID="txtBalanceToPaid" AutoPostBack="true" OnTextChanged="OnChanged" /></td>
</tr>
<tr>
<td>Others:</td>
<td><asp:TextBox runat="server" ID="txtOthers" /></td>
</tr>
</table>
Code
C#
protected void OnChanged(object sender, EventArgs e)
{
txtOthers.Enabled = true;
int toPaid = int.Parse(!string.IsNullOrEmpty(txtBalanceToPaid.Text) ? txtBalanceToPaid.Text : "0");
int toBePaid = int.Parse(!string.IsNullOrEmpty(txtBalanceToBePaid.Text) ? txtBalanceToBePaid.Text : "0");
if (toPaid < toBePaid)
{
txtOthers.Text = string.Empty;
txtOthers.Enabled = false;
}
}
VB.Net
Protected Sub OnChanged(ByVal sender As Object, ByVal e As EventArgs)
txtOthers.Enabled = True
Dim toPaid As Integer = Integer.Parse(If(Not String.IsNullOrEmpty(txtBalanceToPaid.Text), txtBalanceToPaid.Text, "0"))
Dim toBePaid As Integer = Integer.Parse(If(Not String.IsNullOrEmpty(txtBalanceToBePaid.Text), txtBalanceToBePaid.Text, "0"))
If toPaid < toBePaid Then
txtOthers.Text = String.Empty
txtOthers.Enabled = False
End If
End Sub
Screenshot