Hi all,
I am sending email via ASP.NET.
In the message i am wanting to insert a linebreak after an initial
salutation.
In asp I would simply use vbCrLf.
objEmail.Body = "Dear " & Rw("name") & "," & vbCrLf & txtMessage.Text
This doesn't work.
What do i need to do to insert the required line break.
Cheers,
Adam 6 4348
Try
objEmail.Body = "Dear " & Rw("name") & "," & Chr(13) & Chr(10) &
txtMessage.Text
or
objEmail.Body = "Dear " & Rw("name") & ",<p>" & txtMessage.Text
HTH,
"Adam Knight" <ad**@pertrain.com.au> wrote in message
news:eD**************@TK2MSFTNGP11.phx.gbl... Hi all,
I am sending email via ASP.NET. In the message i am wanting to insert a linebreak after an initial salutation. In asp I would simply use vbCrLf.
objEmail.Body = "Dear " & Rw("name") & "," & vbCrLf & txtMessage.Text
This doesn't work.
What do i need to do to insert the required line break.
Cheers, Adam
You can also try
objEmail.Body = "Dear " & Rw("name") & "," & Environment.NewLine &
txtMessage.Text
"Adam Knight" <ad**@pertrain.com.au> wrote in message
news:eD**************@TK2MSFTNGP11.phx.gbl... Hi all,
I am sending email via ASP.NET. In the message i am wanting to insert a linebreak after an initial salutation. In asp I would simply use vbCrLf.
objEmail.Body = "Dear " & Rw("name") & "," & vbCrLf & txtMessage.Text
This doesn't work.
What do i need to do to insert the required line break.
Cheers, Adam
Hi Adam
I do use vbCrLf and it does work. What error are you getting?
"Adam Knight" <ad**@pertrain.com.au> wrote in message
news:eD**************@TK2MSFTNGP11.phx.gbl... Hi all,
I am sending email via ASP.NET. In the message i am wanting to insert a linebreak after an initial salutation. In asp I would simply use vbCrLf.
objEmail.Body = "Dear " & Rw("name") & "," & vbCrLf & txtMessage.Text
This doesn't work.
What do i need to do to insert the required line break.
Cheers, Adam
Hi Dee,
Code:
objEmail.Body = "Dear " & Rw("name") & vbCrLf & "," & txtMessage.Text &
strUrl
Error: Name 'vbCrLf' is not declared
Cheers,
Adam
"dee" <de*@home.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Hi Adam I do use vbCrLf and it does work. What error are you getting?
"Adam Knight" <ad**@pertrain.com.au> wrote in message news:eD**************@TK2MSFTNGP11.phx.gbl... Hi all,
I am sending email via ASP.NET. In the message i am wanting to insert a linebreak after an initial salutation. In asp I would simply use vbCrLf.
objEmail.Body = "Dear " & Rw("name") & "," & vbCrLf & txtMessage.Text
This doesn't work.
What do i need to do to insert the required line break.
Cheers, Adam
Import the Microsoft.VisualBasic namespace.
VbCrLf is a constant. http://msdn2.microsoft.com/en-us/library/f63200h0
Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================
"Adam Knight" <ad**@pertrain.com.au> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl... Hi Dee,
Code: objEmail.Body = "Dear " & Rw("name") & vbCrLf & "," & txtMessage.Text & strUrl
Error: Name 'vbCrLf' is not declared
Cheers, Adam
"dee" <de*@home.net> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Hi Adam I do use vbCrLf and it does work. What error are you getting?
"Adam Knight" <ad**@pertrain.com.au> wrote in message news:eD**************@TK2MSFTNGP11.phx.gbl... Hi all,
I am sending email via ASP.NET. In the message i am wanting to insert a linebreak after an initial salutation. In asp I would simply use vbCrLf.
objEmail.Body = "Dear " & Rw("name") & "," & vbCrLf & txtMessage.Text
This doesn't work.
What do i need to do to insert the required line break.
Cheers, Adam
Have you tried Environment.NewLine?
"Adam Knight" <ad**@pertrain.com.au> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl... Hi Dee,
Code: objEmail.Body = "Dear " & Rw("name") & vbCrLf & "," & txtMessage.Text & strUrl
Error: Name 'vbCrLf' is not declared
Cheers, Adam
"dee" <de*@home.net> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Hi Adam I do use vbCrLf and it does work. What error are you getting?
"Adam Knight" <ad**@pertrain.com.au> wrote in message news:eD**************@TK2MSFTNGP11.phx.gbl... Hi all,
I am sending email via ASP.NET. In the message i am wanting to insert a linebreak after an initial salutation. In asp I would simply use vbCrLf.
objEmail.Body = "Dear " & Rw("name") & "," & vbCrLf & txtMessage.Text
This doesn't work.
What do i need to do to insert the required line break.
Cheers, Adam
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Sylvie Stone |
last post by:
Hi All - I have created a survey and I would like the results of the
survey to be emailed the boss in *plain text*.
Can someone PLEASE take a look and tell me why carriage returns are
not being...
|
by: Hanjo Grüßner |
last post by:
Hello,
I'm not shure wether it's OT or not.
I want to use an eMail as a trigger to start a program.
E.g. an eMail-Group: any group-member sends an eMail to a group-e-adress
an the Mail is...
|
by: Martin Körner |
last post by:
Hi NG,
I am using email module for creating mails with attachment (and then
sending via smtplib).
If the name of the attachment file is longer than about 60 characters
the filename is wrapped...
|
by: Jimbo |
last post by:
Hello
I am currently designing an internal ordering system for IT equipment.
I am designing it in ASP.NET (vb) using Visual Studio 2003 and using
Microsoft SQL Server
I have got the system...
|
by: Adi |
last post by:
Hello eveyone,
I wanna ask a very simple question here (as it was quite disturbing
me for a long time.)
My problem is to read a file line by line. I've tried following
implementations but still...
|
by: comp.lang.php |
last post by:
I came up with functions that I thought would do the trick:
if (!function_exists('smtp_close')) {
/**
* This function will close a socket resource handle
*
* Original function found at...
|
by: Itaichuk |
last post by:
Hi
I read in several CSS tutorials that block-level elements, such as
<div& <pare rendered with an implicit line break before and
after.
I set to test this out using the following HTML:
I...
|
by: Dennis |
last post by:
Hi, I have a text file that contents a list of email addresses like
this:
"foo@yahoo.com"
"tom@hotmail.com"
"jerry@gmail.com"
"tommy@apple.com"
I like to
|
by: n8kindt |
last post by:
ok, i've done quite a bit of research on my problem here. random "! " will appear in my email that i'm sending thru cdo. i've learned that this problem occurs when there are long lines of html (or...
|
by: jeddiki |
last post by:
Hi,
I am using a function called htmlwrap() which states that it
does NOT add a "<br>" to the 70 character
line so that it forces a line wrap.
( the script safely wraps long words without...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |