TextBox Breaks and new lines

  • Thread starter Thread starter Jonathan Dixon
  • Start date Start date
J

Jonathan Dixon

I have a textbox and want to insert data into it from a datagrid like so


TextBox2.Text = "Milestone ID: " + mileid;
TextBox2.Text = TextBox2.Text + "Milestone Name: " + milestonename;
TextBox2.Text = TextBox2.Text + "Milestone Description: " + description;
TextBox2.Text = TextBox2.Text + "Milestone Folder: " + directory;
TextBox2.Text = TextBox2.Text + "Date Added: " + dateadded;


Is there any way to add a newline so that each bit of text appears on a
seperate line of the textbox


Thanks
 
I have added an html text area to the aspx page but how do i assign text to
it from the C# codebehind
 
Dont worry about it i figured it out, changing it to a server control,

Thanks for your help
 
How could i add the breaks or new lines in.

Please reply it is very urgent


Thanks
 
TextBox has property TextMode that can be set to MultiLine. Having set this,
you can insert newline character in the places you want.

Eliyahu
 
VB:
import microsoft.visualbasic

where you want an "enter" put a "vbCrLf" like:

"firstline" & vbCrLf &_
"new line."
Hope this helps you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top