If your controls are in a ListView and the listview is bound to five items, which of those 5 txtPaidAmount controls do you think you're referring to in this code?
var t1Val = document.getElementById("<%=txtPaidAmount.ClientID %>");
Try something like this;
<asp:ListView runat="server" ID="MyListView" OnItemDataBound="MyListView_ItemDataBound">
<ItemTemplate>
Paid: <asp:TextBox ID="txtPaidAmount" runat="server" />
Deduct: <asp:TextBox ID="txtDeductAmount" runat="server" />
</ItemTemplate>
</asp:ListView>
<script type="text/javascript">
function change(paid, deduct) {
var t1Val = document.getElementById(paid);
document.getElementById(deduct).value = 0;
};
</script>
code-behind;
protected void MyListView_ItemDataBound(object sender, ListViewItemEventArgs e)
{
if (e.Item.ItemType == ListViewItemType.DataItem)
{
TextBox txtPaidAmount = (TextBox)e.Item.FindControl("txtPaidAmount");
TextBox txtDeductAmount = (TextBox)e.Item.FindControl("txtDeductAmount");
txtPaidAmount.Attributes.Add("onkeydown", string.Format("change('{0}','{1}')", txtPaidAmount.ClientID, txtDeductAmount.ClientID));
}
}