vb.net string addinging carriage return

S

sean

Can anyone tell me how to add a carriage return to a
string using vb.net?

I need to add two strings with a carrage return together
and post to an email message body ie:

This gives me an error:

string3 = string1 & vbcrlf & string2
mail.body = string3

The probelm I am having is that the original string of
html code is so long it carriage returns or truncates. I
am trying to split up the html in the string when posting
to the mail body to avoid this but can not insert
carriage return.

Sean
 
H

Herfried K. Wagner [MVP]

* "sean said:
Can anyone tell me how to add a carriage return to a
string using vb.net?

I need to add two strings with a carrage return together
and post to an email message body ie:

This gives me an error:

string3 = string1 & vbcrlf & string2
mail.body = string3

The probelm I am having is that the original string of
html code is so long it carriage returns or truncates. I
am trying to split up the html in the string when posting
to the mail body to avoid this but can not insert
carriage return.

You will have to insert a "<br/>" in HTML.
 
R

Ronald Walker

I think what your looking for is Environment.NewLine.

Try this...
string3 = string1 & Environment.NewLine & string2

Hope that helps,
Ronald Walker
 

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

Top