Click here to Skip to main content
14,209,923 members
Rate this:
Please Sign up or sign in to vote.
See more:
suppose line typed in richtextbox is as below:

hi
my
name
is
shailesh

but when the file is saved.the saved files shows output as below:
himynameisshailesh




so,can i get some help for resolving my issue?

What I have tried:

SaveFileDialog1.Filter = "TXT Files (*.txt*)|*.txt|All Files(*.*)|*.*"

If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then

My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, RichTextBox1.Text, True)

MsgBox("File Saved as : " + SaveFileDialog1.FileName)
End If
Posted
Updated 11-Jun-19 23:46pm
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

   
Comments
shaileshshinde 12-Jun-19 7:37am
   
means? i am not able to understand.

can i get the code?
Richard MacCutchan 12-Jun-19 7:56am
   
There is no code. The RichTextBox separates lines only by the newline character, which simple editors (e.g. Notepad) do not recognise. You should use the Lines property to get the text as described in the documentation.
shaileshshinde yesterday
   
Issue has been resolved by myself .Thanks all for help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Cookies | Terms of Service
Web02 | 2.8.190617.3 | Last Updated 12 Jun 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100