Tuesday, March 13, 2012

Simple HTML question. Can u help me out?

Hi,
i created a script to send form values by email. I am working in ASP.net /
VB.
The email is sent in HTM format.
Well, i everything is working fine but i am getting an error in the
msg.Body. Can you tell me what i am doing wrong?
Ln1 - msg.Body = "<html><head><style type='text/css'> {font-family: Ver
dana,
Arial, Helvetica, sans-serif; font-size: 11px;color: #333333;
background-color: </style></head><body>" &_
Ln2 - "<strong>New Message</strong>" &_
Ln3 - "<br><strong> From: </strong>" & msgFrom &_
Ln4 - "<br><strong> Name: </strong>" & msgName &_
Ln5 - "<br><strong> To: </strong>" & msgTo &_
Ln6 - "<br><strong> Subject: </strong>" & msgSubject &_
Ln7 - "<br><strong>Message Text</strong>" &_
Ln8 - "<br> " & msgMessageField &_
Ln9 - "</body></html>"
The error i get is the following:
BC30203: Identifier expected. Line 1
Thank You,
MiguelUse the line-continuation character, which is a space followed by an undersc
ore ( _), at the point at which you want the line to break. In the following
example, the statement is broken into three lines with line-continuation ch
aracters.
Ln1 - msg.Body = "<html><head><style type='text/css'> {font-family: Ver
dana,
Arial, Helvetica, sans-serif; font-size: 11px;color: #333333;
background-color: </style></head><body>" & _
Ln2 - "<strong>New Message</strong>" & _
Ln3 - "<br><strong> ? From: </strong>" & msgFrom & _
Ln4 - "<br><strong> ? Name: </strong>" & msgName & _
Ln5 - "<br><strong> ? To: </strong>" & msgTo & _
Ln6 - "<br><strong> ? Subject: </strong>" & msgSubject & _
Ln7 - "<br><strong>Message Text</strong>" & _
Ln8 - "<br> " & msgMessageField & _
Ln9 - "</body></html>"
Bin Song, MCP
-- Miguel Dias Moura wrote: --
Hi,
i created a script to send form values by email. I am working in ASP.net /
VB.
The email is sent in HTM format.
Well, i everything is working fine but i am getting an error in the
msg.Body. Can you tell me what i am doing wrong?
Ln1 - msg.Body = "<html><head><style type='text/css'> {font-family: Ver
dana,
Arial, Helvetica, sans-serif; font-size: 11px;color: #333333;
background-color: </style></head><body>" &_
Ln2 - "<strong>New Message</strong>" &_
Ln3 - "<br><strong> ? From: </strong>" & msgFrom &_
Ln4 - "<br><strong> ? Name: </strong>" & msgName &_
Ln5 - "<br><strong> ? To: </strong>" & msgTo &_
Ln6 - "<br><strong> ? Subject: </strong>" & msgSubject &_
Ln7 - "<br><strong>Message Text</strong>" &_
Ln8 - "<br> " & msgMessageField &_
Ln9 - "</body></html>"
The error i get is the following:
BC30203: Identifier expected. Line 1
Thank You,
Miguel
It's solved...stupid thing: used &_ instead of & _
Thanks Anyway,
Miguel
"Bin Song" <anonymous@.discussions.microsoft.com> wrote in message
news:33AC78C7-8A13-4ACA-B795-522368553033@.microsoft.com...
> Use the line-continuation character, which is a space followed by an
underscore ( _), at the point at which you want the line to break. In the
following example, the statement is broken into three lines with
line-continuation characters.
> Ln1 - msg.Body = "<html><head><style type='text/css'> {font-family:[/colo
r]
Verdana,
> Arial, Helvetica, sans-serif; font-size: 11px;color: #333333;
> background-color: </style></head><body>" & _
> Ln2 - "<strong>New Message</strong>" & _
> Ln3 - "<br><strong> From: </strong>" & msgFrom & _
> Ln4 - "<br><strong> Name: </strong>" & msgName & _
> Ln5 - "<br><strong> To: </strong>" & msgTo & _
> Ln6 - "<br><strong> Subject: </strong>" & msgSubject & _
> Ln7 - "<br><strong>Message Text</strong>" & _
> Ln8 - "<br> " & msgMessageField & _
> Ln9 - "</body></html>"
> Bin Song, MCP
> -- Miguel Dias Moura wrote: --
> Hi,
> i created a script to send form values by email. I am working in
ASP.net /
> VB.
> The email is sent in HTM format.
> Well, i everything is working fine but i am getting an error in the
> msg.Body. Can you tell me what i am doing wrong?
> Ln1 - msg.Body = "<html><head><style type='text/css'> {font-family:[/col
or]
Verdana,
> Arial, Helvetica, sans-serif; font-size: 11px;color: #333333;
> background-color: </style></head><body>" &_
> Ln2 - "<strong>New Message</strong>" &_
> Ln3 - "<br><strong> From: </strong>" & msgFrom &_
> Ln4 - "<br><strong> Name: </strong>" & msgName &_
> Ln5 - "<br><strong> To: </strong>" & msgTo &_
> Ln6 - "<br><strong> Subject: </strong>" & msgSubject &_
> Ln7 - "<br><strong>Message Text</strong>" &_
> Ln8 - "<br> " & msgMessageField &_
> Ln9 - "</body></html>"
> The error i get is the following:
> BC30203: Identifier expected. Line 1
> Thank You,
> Miguel
>
>
>

0 comments:

Post a Comment