i put a break in textbox condition...
if (hfRid.Value == "0")
{
TextBox txtamount = (TextBox)item.FindControl("txtfund1");
if (txtamount != null)
{
amount = Convert.ToString(txtamount.Text);
}
break;
}
else
{
DropDownList ddlTot = (DropDownList)item.FindControl("ddlTotal");
if (ddlTot != null)
{
tot = ddlTot.SelectedItem.Value.ToString();
}
}