Write textbox text to a text file [VB.NET] - Printable Version +- howtothings.co.uk (https://www.howtothings.co.uk) +-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4) +--- Forum: Programming Support, Graphic Design and Tutorials (https://www.howtothings.co.uk/forumdisplay.php?fid=14) +--- Thread: Write textbox text to a text file [VB.NET] (/showthread.php?tid=1117) |
Write textbox text to a text file [VB.NET] - Clones - 11-11-2011 In this tutorial I am going to show you how to write text to a file from TextBox. For example, you have some text in TextBox you want to save on your computer, you can do it by creating a text file. The code is: Code: My.Computer.FileSystem.WriteAllText("C:\location\file.txt", TextBox1.Text, True) Replace "C:\location\file.txt" with the location where the file should be created. It must be a .txt extension! True -> means it won't overwrite if the file is already existing. It'll keep original content. False -> means if the file already exists, it will overwrite it. Enjoy. RE: Write textbox text to a text file [VB.NET] - Drumm - 11-11-2011 Doesn't need to be .txt at all.. RE: Write textbox text to a text file [VB.NET] - latch - 02-12-2011 Aye! Linux looks for a magic number! |