Hi,

Tq for ur support before....

I got some stuck here regarding how to make my text file write a new line for each input from textbox..

E.g :-

I have a one textbox1 , when i insert any value in textbox it will save into my textfile. .. but when i;m insert new value it will replace my exist value in my text file...how to make it write into new line and remain all the value?..

tq

Recommended Answers

You need to specify the writing mode as being:

IO.FileMode.Append

Jump to Post

You may use System.IO.File.AppendText(...) Method.

Jump to Post

All 7 Replies

You need to specify the writing mode as being:

IO.FileMode.Append

You may use System.IO.File.AppendText(...) Method.

Thanks guys

hi all,

try the following it works

dim swriter as streamwriter
swriter=File.AppendText("filename.txt")
swriter.writeline(" pass your data here )
swriter.close()

hi all,

try the following it works

dim swriter as streamwriter
swriter=File.AppendText("filename.txt")
swriter.writeline(" pass your data here )
swriter.close()

No it won't, you're missing a ". Besides, this thread was solved over a year ago..

i hope this helps

will this code accept my path: ("c:\users\lebol\desktop\test\" +Nackfile, false)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.