Simple HTML question. Can u help me out?

Discussion in 'ASP .Net' started by Miguel Dias Moura, Apr 1, 2004.

  1. 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: Verdana,
    Arial, Helvetica, sans-serif; font-size: 11px;color: #333333;
    background-color: </style></head><body>" &_
    Ln2 - "<strong>New Message</strong>" &_
    Ln3 - "<br><strong>&nbsp;» From: </strong>" & msgFrom &_
    Ln4 - "<br><strong>&nbsp;» Name: </strong>" & msgName &_
    Ln5 - "<br><strong>&nbsp;» To: </strong>" & msgTo &_
    Ln6 - "<br><strong>&nbsp;» 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
    Miguel Dias Moura, Apr 1, 2004
    #1
    1. Advertising

  2. It's solved...stupid thing: used &_ instead of & _

    Thanks Anyway,
    Miguel

    "Bin Song" <> wrote in message
    news:...
    > 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:

    Verdana,
    > Arial, Helvetica, sans-serif; font-size: 11px;color: #333333;
    > background-color: </style></head><body>" & _
    > Ln2 - "<strong>New Message</strong>" & _
    > Ln3 - "<br><strong>&nbsp;» From: </strong>" & msgFrom & _
    > Ln4 - "<br><strong>&nbsp;» Name: </strong>" & msgName & _
    > Ln5 - "<br><strong>&nbsp;» To: </strong>" & msgTo & _
    > Ln6 - "<br><strong>&nbsp;» 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:

    Verdana,
    > Arial, Helvetica, sans-serif; font-size: 11px;color: #333333;
    > background-color: </style></head><body>" &_
    > Ln2 - "<strong>New Message</strong>" &_
    > Ln3 - "<br><strong>&nbsp;» From: </strong>" & msgFrom &_
    > Ln4 - "<br><strong>&nbsp;» Name: </strong>" & msgName &_
    > Ln5 - "<br><strong>&nbsp;» To: </strong>" & msgTo &_
    > Ln6 - "<br><strong>&nbsp;» 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
    >
    >
    >
    >
    >
    >
    Miguel Dias Moura, Apr 2, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Carver

    Simple HTML question. Can u help me out?

    Jeff Carver, Apr 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    312
    Jeff Carver
    Apr 2, 2004
  2. sincethe2003
    Replies:
    2
    Views:
    531
    Craig Deelsnyder
    Jul 14, 2004
  3. myleslawrence

    Simple but I can't figure it out

    myleslawrence, Jan 19, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    310
    IPGrunt
    Jan 19, 2005
  4. SUPER_SOCKO
    Replies:
    1
    Views:
    377
    Ben Hetland
    Feb 28, 2005
  5. Wladimir Borsov
    Replies:
    4
    Views:
    270
    Tintin
    May 11, 2006
Loading...

Share This Page