VB.NET Tutorial For Beginners – Writing to a File with StreamWriter (Visual Basic .NET)

In this beginner Visual Basic .NET programming tutorial, I’ll be teaching you how to write information to a file using the .NET StreamWriter and save it to disk with the SaveFileDialog. I’ll also demonstrate how you can use the StreamWriter to create a basic web page using HTML.

Tutorial Features:
VB.NET StreamWriter – Create and Write data to a file
SaveFileDialog – Browse computer for file saving
VB.NET Form Controls – TextBox, Command Button
Basic HTML/CSS

Comments

Moving Art says:

So how would you write pure numbers to a file as a .txt file saves them as a string.

sigit pradana says:

why not SW.WriteLine(TextBox1.Text) ? i tried and succesfully without error. And can save multiline of text… cmiiw. thanks

Anthony Joseph says:

Excellent work you are explain easy way to understand.. I am glad to find your VB Toolbox ..

James Webber says:

As usual, many years on since you made this, it’s helped me! Thanks for all the hard work you put into these videos!

Steve Harris says:

Excellent video and really helpful. Now if you’d make a video on how to write rows of an Access DB to a text file, I’d be the happiest of campers!

Miriam Williams says:

Super helpful, thank you!

Jack Walker says:

Excellent tutorial. Thank you!

 Write a comment

*

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!