asp.net & word problem

G

Guest

I have some code that inputs text into a word template but I cant figure out
how to input a line break. I have:

cell.Range.Text = "Jesse Johnson";
I NEED TO A LINE BREAK HERE
cell.Range.Text = "Address";
I NEED TO A LINE BREAK HERE
cell.Range.Text = "City, State Zip";

I want it to read:

Jesse Johnson
Address
City, State Zip

Cant figure this out. Any ideas?
 
G

Guest

Nevermind, I answered my own question. For everyone its just a simple \n

like this: string = "Name" + '\n' + "Address"

pretty simple.
 
J

Jason Hales

FYI I'd favour the use of Environment.NewLine rather than \n
"The property value is a constant customized specifically for the
current platform"
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top