473,386 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

vb.net string addinging carriage return

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
2 40001
* "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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Canes_Rock | last post by:
The information posted at: ...
4
by: Josh | last post by:
Hi, I'm using System.Data.DataSet.ReadXml to convert some xml from a webservice to a DataSet. The xml looks like: <?xml version="1.0"...
2
by: John Dalberg | last post by:
Hi What's the regex to remove the carriage return/line field from a string? These can occur multiple times in the string as in xxx\r\n\r\n. -- John Dalberg
2
by: sys | last post by:
I have a web method that returns a string. When I return a string that has a carriage return and line feed in it ("\r\n") on the client side I only receive a string including the line feed ("\n")....
11
by: TheRain | last post by:
Hi, I am trying to append a carriage return to my string using the string builder class, but when I do this the string ends up containing "13". I tried this multiple ways like so ...
5
by: Generic Usenet Account | last post by:
I have been to recreate a problem that I am having with strings with the trivial code snippet given below. In the trivial code example, I am reading five lines from a data file, each line having...
6
by: Stick | last post by:
Hi, I am trying to start my email app (in this case Eudora) with a programatically generated email. However, Eudora does not seem to recognize any of the ways I have tried to create line...
1
by: kellysgirl | last post by:
Now what you are going to see posted here is both the set of instructions I was given..and the code I have written. The instructions I was given are as follows In this case, you will create...
23
by: KIRAN | last post by:
Hi all, can i split a C string like this? char * p = "Hello \ World\n\r"; is this according to standard? Any help or link to standard regarding the above doubt is aprreciated... Regards, Kiran
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.