In the sample code posted in that thread it uses the line: sw.writeline(itm.ToString) to actually write a line in the text file. So what you want to do is put the information you want written there instead of item.ToString. For instance if I had a textbox named txtUser then I'd use: sw.Writeline(txtUser.Text)