Textbox value formatting

G

Guest

Dear Experts,

I would like to find out whether can I retrieve a string from the database
and retain the format in the string to be show in a textbox control or append
into a message's body to be sent out through email. For example, the string
is as follow:
--------------------------------------------
Dear all,

Kindly be informed that we will have the following guests visiting our
facility today:

Rizalman Ibrahim Inc. Sdn Bhd
Rizalman Ibrahim
Zamir Shukri
Syed Abdul Rahman

--------------------------------------------

Can I maintain the same format into the textbox control and append into the
email message body?


Please advise and thanks.

Regards,
SB
 
C

Cor Ligthert [MVP]

Seok,

Probably will UrlEncode do this for you.

I myself am in these case mostly so lazy that I do

Dim MyMailstring as string = MyString.Replace("VBCRLF", "<br>")

I hope this helps,

Cor
 
C

C-Services Holland b.v.

Cor said:
Seok,

Probably will UrlEncode do this for you.

I myself am in these case mostly so lazy that I do

Dim MyMailstring as string = MyString.Replace("VBCRLF", "<br>")

I hope this helps,

Cor

Does this actually work? Doesn't it look voor the string "VBCRLF" which
isn't there?

Or did you mean this:
Dim MyMailstring as string = MyString.Replace(VbCrLf, "<br>")

No idea if that actually works though. But I would avoid using HTML in
email all together and just dump the textbox contents in the mail unless
you have a very good reason to use HTML.
 
C

Cor Ligthert [MVP]

Rinze,

I had to look twice to see my stupidity, of course has it to be as you
write.

I assume that it was a kind of typo.

However thanx for correcting this mistake.
(Before you think it is not, I knew this)

I agree with you about the HTML.

:)

Cor
 

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