vb.net string addinging carriage return

  • Thread starter Thread starter sean
  • Start date Start date
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
 
* "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.
 
I think what your looking for is Environment.NewLine.

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

Hope that helps,
Ronald Walker
 
Back
Top