Without seeing how you are creating teh controls its difficult but here's an overview of what I might do...
When I create the texbox and button, set the Button's Tag property to the TextBox
Now when I click the button I can access the textbox with
string myString = (TextBox)(button.Tag).Text;