1
Reply

how to wrap contents of a textbox

jamie

jamie

Jan 17 2008 11:53 PM
2.9k

I created a for using several textboxes that have multiple lines enabled and i noticed that when i enter data, it prints it to the text file in one really long ling. How do i get it to wrap the contents of the textbox?

  I have tried this with not luck. I found the post on this site while trying to search for the answer, but it didn't work for me.

My code starts

 text7 = textBox7.Text;

if(text7.Equals(""))

{

Messagebox.Show("You must fill in this information");

   return;

}

StringReader sr = new StringReader(text7);

string LineData = sr.ReadLine();

while (LineData != null)

{

sw.WriteLine(text7);

LineData = sr.ReadLine();

}


Answers (1)