By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,797 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

vb.net string addinging carriage return

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* "sean" <sk******@hotmail.com> scripsit:
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.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a
I think what your looking for is Environment.NewLine.

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

Hope that helps,
Ronald Walker
"sean" <sk******@hotmail.com> wrote in message
news:00****************************@phx.gbl...
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

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.