Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


Write textbox text to a text file [VB.NET]
11-11-2011, 04:15 PM
Post: #1
Write textbox text to a text file [VB.NET]
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! Smile

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.
Reply
11-11-2011, 07:13 PM
Post: #2
RE: Write textbox text to a text file [VB.NET]
Doesn't need to be .txt at all..

[Image: nomnomnom.jpg]
;7$=v?%v%#5>v7v8994
The decrypt code is V, I could not make it any simpler!
Reply
02-12-2011, 02:32 AM
Post: #3
RE: Write textbox text to a text file [VB.NET]
Aye! Linux looks for a magic number!

Having long hair is great until you have to pull a footlong out of the dog's butt. flatank.blogspot.com
I. AM. LATCH.
Reply



Forum Jump:


User(s) browsing this thread: 1 Guest(s)