Problem with StreamWriter Class - vb 2005

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TonyF
    New Member
    • Aug 2007
    • 1

    Problem with StreamWriter Class - vb 2005

    Hi

    I'm trying to append a text file from input from a TextBox for some reason I get the fowwlowing output:

    frh001wa2555655
    f
    fr
    frh
    frh0
    frh00
    frh001
    frh001w
    frh001wa
    frh001wa2
    frh001wa26
    frh001wa261
    frh001wa2613
    frh001wa26135
    frh001wa261351
    frh001wa2613519

    code:

    Dim objStreamWriter As StreamWriter

    'Pass the file path and the file name to the StreamWriter constructor.
    objStreamWriter = New StreamWriter("D :\Host.txt")

    'Write a line of text.
    objStreamWriter .WriteLine(Me.T extbox1.Text, True) 'True for append

    'Close the file.
    objStreamWriter .Close()
Working...