Reading and Saving a textfile [solved]
Ok, so im making a web editor sorta like adobe dreamweaver, and im at the part where it opens a selected text file and displays the contents of that textfile in a textbox.
The problem is i cant figure out how to do that.
Also, i need to know how to save the file (or save as) when the user is done editing/creating it.
Thanks!
Dim fs As New FileStream("C:\test.txt", FileMode.Open)
Dim sr As New StreamReader(fs)
Dim zeile As String
Do Until sr.Peek() = -1
zeile = sr.ReadLine()
Textbox1.Text &= zeile & vbCrLf
Loop
sr.Close()