You have:
double dynamicamount = Convert.ToDouble();
double dynamicsubamount = Convert.ToDouble();
You're not passing any values into Convert.ToDouble(), so that would be a problem, no? Is it compiling like this?
I think you just have to assign the value back to the textbox:
((TextBox)item.FindControl("txtAmount").Text = your_value
Cheers.