Export to text

Say i have some text boxes they are dynamic or whatever. How can i export all of the current data in all the text boxes to a text file.