vbCrLf

Discussion in 'ASP .Net' started by dancer, May 9, 2007.

  1. dancer

    dancer Guest

    What is this? vbCrLf
     
    dancer, May 9, 2007
    #1
    1. Advertising

  2. vbCrLf = Visual Basic Carriage Return Line Feed.




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ===================================
    "dancer" <> wrote in message news:...
    > What is this? vbCrLf
    >
     
    Juan T. Llibre, May 9, 2007
    #2
    1. Advertising

  3. dancer

    Ross Culver Guest

    It's like hitting the 'Enter' key, man . . . .

    "dancer" <> wrote in message
    news:...
    > What is this? vbCrLf
    >
     
    Ross Culver, May 9, 2007
    #3
  4. dancer

    dancer Guest

    Then why do I not get new lines with this code?

    'Set the body
    objMM.Body = DateTime.Now + " feedback was sent from an ASP.NET " &
    _
    "Wheeler's Accident Investigation Form" & _
    vbCrLf &vbCrLf & _
    Check1.Text & "." & vbCrLf & vbCrLf & _
    vbCrLf &vbCrLf & _
    Check2.Text & vbCrLf

    "Juan T. Llibre" <> wrote in message
    news:%...
    > vbCrLf = Visual Basic Carriage Return Line Feed.
    >
    >
    >
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq : http://asp.net.do/faq/
    > foros de asp.net, en español : http://asp.net.do/foros/
    > ===================================
    > "dancer" <> wrote in message
    > news:...
    >> What is this? vbCrLf
    >>

    >
    >
     
    dancer, May 9, 2007
    #4
  5. dancer

    David Guest

    If you look in your source code (view source) you will see new lines.

    In order to put lines in the rendered output, then you really need a BR tag.
    <br />

    --
    Best regards,
    Dave Colliver.
    http://www.AshfieldFOCUS.com
    ~~
    http://www.FOCUSPortals.com - Local franchises available


    "dancer" <> wrote in message
    news:...
    > Then why do I not get new lines with this code?
    >
    > 'Set the body
    > objMM.Body = DateTime.Now + " feedback was sent from an ASP.NET "
    > & _
    > "Wheeler's Accident Investigation Form" & _
    > vbCrLf &vbCrLf & _
    > Check1.Text & "." & vbCrLf & vbCrLf & _
    > vbCrLf &vbCrLf & _
    > Check2.Text & vbCrLf
    >
    > "Juan T. Llibre" <> wrote in message
    > news:%...
    >> vbCrLf = Visual Basic Carriage Return Line Feed.
    >>
    >>
    >>
    >>
    >> Juan T. Llibre, asp.net MVP
    >> asp.net faq : http://asp.net.do/faq/
    >> foros de asp.net, en español : http://asp.net.do/foros/
    >> ===================================
    >> "dancer" <> wrote in message
    >> news:...
    >>> What is this? vbCrLf
    >>>

    >>
    >>

    >
    >
     
    David, May 9, 2007
    #5
  6. dancer

    Mark Rae Guest

    "dancer" <> wrote in message
    news:...

    > Then why do I not get new lines with this code?


    Because vbCrLf isn't HTML... :)

    Use <br /> instead.


    --
    http://www.markrae.net
     
    Mark Rae, May 9, 2007
    #6
  7. dancer

    dancer Guest

    But you don't use <br> in VB do you? Only in HTML?


    "David" <> wrote in message
    news:...
    > If you look in your source code (view source) you will see new lines.
    >
    > In order to put lines in the rendered output, then you really need a BR
    > tag. <br />
    >
    > --
    > Best regards,
    > Dave Colliver.
    > http://www.AshfieldFOCUS.com
    > ~~
    > http://www.FOCUSPortals.com - Local franchises available
    >
    >
    > "dancer" <> wrote in message
    > news:...
    >> Then why do I not get new lines with this code?
    >>
    >> 'Set the body
    >> objMM.Body = DateTime.Now + " feedback was sent from an ASP.NET "
    >> & _
    >> "Wheeler's Accident Investigation Form" & _
    >> vbCrLf &vbCrLf & _
    >> Check1.Text & "." & vbCrLf & vbCrLf & _
    >> vbCrLf &vbCrLf & _
    >> Check2.Text & vbCrLf
    >>
    >> "Juan T. Llibre" <> wrote in message
    >> news:%...
    >>> vbCrLf = Visual Basic Carriage Return Line Feed.
    >>>
    >>>
    >>>
    >>>
    >>> Juan T. Llibre, asp.net MVP
    >>> asp.net faq : http://asp.net.do/faq/
    >>> foros de asp.net, en español : http://asp.net.do/foros/
    >>> ===================================
    >>> "dancer" <> wrote in message
    >>> news:...
    >>>> What is this? vbCrLf
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    dancer, May 9, 2007
    #7
  8. Probably because you're writing HTML.

    vbCrLf only works within VB.NET code.

    If you're writing HTML, use <br> :

    'Set the body
    objMM.Body = DateTime.Now + " feedback was sent from an ASP.NET " & _
    "Wheeler's Accident Investigation Form" & "<br>" & Check1.Text & "." & "<br>" & Check2.Text & "<br>"




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ===================================
    "dancer" <> wrote in message news:...
    > Then why do I not get new lines with this code?
    >
    > 'Set the body
    > objMM.Body = DateTime.Now + " feedback was sent from an ASP.NET " & _
    > "Wheeler's Accident Investigation Form" & _
    > vbCrLf &vbCrLf & _
    > Check1.Text & "." & vbCrLf & vbCrLf & _
    > vbCrLf &vbCrLf & _
    > Check2.Text & vbCrLf
    >
    > "Juan T. Llibre" <> wrote in message
    > news:%...
    >> vbCrLf = Visual Basic Carriage Return Line Feed.
    >>
    >>
    >>
    >>
    >> Juan T. Llibre, asp.net MVP
    >> asp.net faq : http://asp.net.do/faq/
    >> foros de asp.net, en español : http://asp.net.do/foros/
    >> ===================================
    >> "dancer" <> wrote in message news:...
    >>> What is this? vbCrLf
    >>>

    >>
    >>

    >
    >
     
    Juan T. Llibre, May 9, 2007
    #8
  9. dancer

    dancer Guest

    I am confused.

    You will notice that this is VB, not HTML. What do I use so that
    Location.Text and Check1.Text and Check2.Text will be on a new line when
    they appear in the e-mail?

    <script language="VB" runat="server">


    Sub btnSendFeedback_Click(sender as Object, e as EventArgs)

    'Create an instance of the MailMessage class
    Dim objMM as New MailMessage()

    'Set the properties - send the email to the person who filled out
    the
    'feedback form.
    objMM.To =

    objMM.From = ""
    'send in html format
    objMM.BodyFormat = MailFormat.Html
    'Set the priority - options are High, Low, and Normal
    objMM.Priority = MailPriority.Normal

    'Set the subject
    objMM.Subject = "Accident Investigation Form"

    'Set the body
    objMM.Body = DateTime.Now + " " & _
    Location.Text & _
    vbCrLf & vbCrLf & _
    Check1.Text & "." & vbCrLf & vbCrLf & _
    vbCrLf &vbCrLf & _
    Check2.Text & vbCrLf

    'Specify to use the default Smtp Server
    SmtpMail.SmtpServer = ""
    'Now, to send the message, use the Send method of the SmtpMail class
    SmtpMail.Send(objMM)
    panelSendEmail.Visible = false
    panelMailSent.Visible = true
    End Sub



    "Mark Rae" <> wrote in message
    news:...
    > "dancer" <> wrote in message
    > news:...
    >
    >> Then why do I not get new lines with this code?

    >
    > Because vbCrLf isn't HTML... :)
    >
    > Use <br /> instead.
    >
    >
    > --
    > http://www.markrae.net
     
    dancer, May 9, 2007
    #9
  10. On May 9, 7:44 pm, "dancer" <> wrote:
    > But you don't use <br> in VB do you? Only in HTML?
    >


    when you have

    objMM.BodyFormat = MailFormat.Html

    you have to use HTML - so, you have to use a <br> tag

    when you will change

    objMM.BodyFormat = MailFormat.Text

    you can use vbCrLf to make new lines.

    In this case your email message will be sent as a plain text.
     
    Alexey Smirnov, May 9, 2007
    #10
  11. re:
    !> You will notice that this is VB, not HTML.

    Actually, it *is* HTML.

    Maybe you missed this line :

    'send in html format

    What you are doing in that code is *composing HTML*.





    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ===================================
    "dancer" <> wrote in message news:Oev%...
    >I am confused.
    >
    > You will notice that this is VB, not HTML. What do I use so that Location.Text and Check1.Text
    > and Check2.Text will be on a new line when they appear in the e-mail?
    >
    > <script language="VB" runat="server">
    >
    >
    > Sub btnSendFeedback_Click(sender as Object, e as EventArgs)
    >
    > 'Create an instance of the MailMessage class
    > Dim objMM as New MailMessage()
    >
    > 'Set the properties - send the email to the person who filled out the
    > 'feedback form.
    > objMM.To =
    >
    > objMM.From = ""
    > 'send in html format
    > objMM.BodyFormat = MailFormat.Html
    > 'Set the priority - options are High, Low, and Normal
    > objMM.Priority = MailPriority.Normal
    >
    > 'Set the subject
    > objMM.Subject = "Accident Investigation Form"
    >
    > 'Set the body
    > objMM.Body = DateTime.Now + " " & _
    > Location.Text & _
    > vbCrLf & vbCrLf & _
    > Check1.Text & "." & vbCrLf & vbCrLf & _
    > vbCrLf &vbCrLf & _
    > Check2.Text & vbCrLf
    >
    > 'Specify to use the default Smtp Server
    > SmtpMail.SmtpServer = ""
    > 'Now, to send the message, use the Send method of the SmtpMail class
    > SmtpMail.Send(objMM)
    > panelSendEmail.Visible = false
    > panelMailSent.Visible = true
    > End Sub
    >
    >
    >
    > "Mark Rae" <> wrote in message news:...
    >> "dancer" <> wrote in message news:...
    >>
    >>> Then why do I not get new lines with this code?

    >>
    >> Because vbCrLf isn't HTML... :)
    >>
    >> Use <br /> instead.
    >>
    >>
    >> --
    >> http://www.markrae.net

    >
    >
     
    Juan T. Llibre, May 9, 2007
    #11
  12. dancer

    dancer Guest

    THANK YOU VERY MUCH. I'm so glad to get that cleared up!!


    "Juan T. Llibre" <> wrote in message
    news:%23aO7%...
    > Probably because you're writing HTML.
    >
    > vbCrLf only works within VB.NET code.
    >
    > If you're writing HTML, use <br> :
    >
    > 'Set the body
    > objMM.Body = DateTime.Now + " feedback was sent from an ASP.NET " & _
    > "Wheeler's Accident Investigation Form" & "<br>" & Check1.Text & "." &
    > "<br>" & Check2.Text & "<br>"
    >
    >
    >
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq : http://asp.net.do/faq/
    > foros de asp.net, en español : http://asp.net.do/foros/
    > ===================================
    > "dancer" <> wrote in message
    > news:...
    >> Then why do I not get new lines with this code?
    >>
    >> 'Set the body
    >> objMM.Body = DateTime.Now + " feedback was sent from an ASP.NET "
    >> & _
    >> "Wheeler's Accident Investigation Form" & _
    >> vbCrLf &vbCrLf & _
    >> Check1.Text & "." & vbCrLf & vbCrLf & _
    >> vbCrLf &vbCrLf & _
    >> Check2.Text & vbCrLf
    >>
    >> "Juan T. Llibre" <> wrote in message
    >> news:%...
    >>> vbCrLf = Visual Basic Carriage Return Line Feed.
    >>>
    >>>
    >>>
    >>>
    >>> Juan T. Llibre, asp.net MVP
    >>> asp.net faq : http://asp.net.do/faq/
    >>> foros de asp.net, en español : http://asp.net.do/foros/
    >>> ===================================
    >>> "dancer" <> wrote in message
    >>> news:...
    >>>> What is this? vbCrLf
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    dancer, May 9, 2007
    #12
  13. Boy, I am too! Was getting a little worried there. :)
    --
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short urls & more: http://ittyurl.net




    "dancer" wrote:

    > THANK YOU VERY MUCH. I'm so glad to get that cleared up!!
    >
    >
    > "Juan T. Llibre" <> wrote in message
    > news:%23aO7%...
    > > Probably because you're writing HTML.
    > >
    > > vbCrLf only works within VB.NET code.
    > >
    > > If you're writing HTML, use <br> :
    > >
    > > 'Set the body
    > > objMM.Body = DateTime.Now + " feedback was sent from an ASP.NET " & _
    > > "Wheeler's Accident Investigation Form" & "<br>" & Check1.Text & "." &
    > > "<br>" & Check2.Text & "<br>"
    > >
    > >
    > >
    > >
    > > Juan T. Llibre, asp.net MVP
    > > asp.net faq : http://asp.net.do/faq/
    > > foros de asp.net, en español : http://asp.net.do/foros/
    > > ===================================
    > > "dancer" <> wrote in message
    > > news:...
    > >> Then why do I not get new lines with this code?
    > >>
    > >> 'Set the body
    > >> objMM.Body = DateTime.Now + " feedback was sent from an ASP.NET "
    > >> & _
    > >> "Wheeler's Accident Investigation Form" & _
    > >> vbCrLf &vbCrLf & _
    > >> Check1.Text & "." & vbCrLf & vbCrLf & _
    > >> vbCrLf &vbCrLf & _
    > >> Check2.Text & vbCrLf
    > >>
    > >> "Juan T. Llibre" <> wrote in message
    > >> news:%...
    > >>> vbCrLf = Visual Basic Carriage Return Line Feed.
    > >>>
    > >>>
    > >>>
    > >>>
    > >>> Juan T. Llibre, asp.net MVP
    > >>> asp.net faq : http://asp.net.do/faq/
    > >>> foros de asp.net, en español : http://asp.net.do/foros/
    > >>> ===================================
    > >>> "dancer" <> wrote in message
    > >>> news:...
    > >>>> What is this? vbCrLf
    > >>>>
    > >>>
    > >>>
    > >>
    > >>

    > >
    > >

    >
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, May 9, 2007
    #13
  14. dancer

    David Guest

    ROFLMAO

    :-D

    --
    Best regards,
    Dave Colliver.
    http://www.AshfieldFOCUS.com
    ~~
    http://www.FOCUSPortals.com - Local franchises available


    "Peter Bromberg [C# MVP]" <> wrote in
    message news:...
    > Boy, I am too! Was getting a little worried there. :)
    > --
    > Site: http://www.eggheadcafe.com
    > UnBlog: http://petesbloggerama.blogspot.com
    > Short urls & more: http://ittyurl.net
    >
    >
    >
    >
    > "dancer" wrote:
    >
    >> THANK YOU VERY MUCH. I'm so glad to get that cleared up!!
    >>
    >>
    >> "Juan T. Llibre" <> wrote in message
    >> news:%23aO7%...
    >> > Probably because you're writing HTML.
    >> >
    >> > vbCrLf only works within VB.NET code.
    >> >
    >> > If you're writing HTML, use <br> :
    >> >
    >> > 'Set the body
    >> > objMM.Body = DateTime.Now + " feedback was sent from an ASP.NET " & _
    >> > "Wheeler's Accident Investigation Form" & "<br>" & Check1.Text & "." &
    >> > "<br>" & Check2.Text & "<br>"
    >> >
    >> >
    >> >
    >> >
    >> > Juan T. Llibre, asp.net MVP
    >> > asp.net faq : http://asp.net.do/faq/
    >> > foros de asp.net, en español : http://asp.net.do/foros/
    >> > ===================================
    >> > "dancer" <> wrote in message
    >> > news:...
    >> >> Then why do I not get new lines with this code?
    >> >>
    >> >> 'Set the body
    >> >> objMM.Body = DateTime.Now + " feedback was sent from an
    >> >> ASP.NET "
    >> >> & _
    >> >> "Wheeler's Accident Investigation Form" & _
    >> >> vbCrLf &vbCrLf & _
    >> >> Check1.Text & "." & vbCrLf & vbCrLf & _
    >> >> vbCrLf &vbCrLf & _
    >> >> Check2.Text & vbCrLf
    >> >>
    >> >> "Juan T. Llibre" <> wrote in message
    >> >> news:%...
    >> >>> vbCrLf = Visual Basic Carriage Return Line Feed.
    >> >>>
    >> >>>
    >> >>>
    >> >>>
    >> >>> Juan T. Llibre, asp.net MVP
    >> >>> asp.net faq : http://asp.net.do/faq/
    >> >>> foros de asp.net, en español : http://asp.net.do/foros/
    >> >>> ===================================
    >> >>> "dancer" <> wrote in message
    >> >>> news:...
    >> >>>> What is this? vbCrLf
    >> >>>>
    >> >>>
    >> >>>
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>
    >>
     
    David, May 9, 2007
    #14
  15. dancer

    Mark Rae Guest

    "Peter Bromberg [C# MVP]" <> wrote in
    message news:...

    > Boy, I am too! Was getting a little worried there. :)


    I was getting ready to sell my flat and head for the hills...


    --
    http://www.markrae.net
     
    Mark Rae, May 9, 2007
    #15
    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. Hermit Dave
    Replies:
    0
    Views:
    400
    Hermit Dave
    Sep 21, 2004
  2. GrantMagic
    Replies:
    0
    Views:
    402
    GrantMagic
    Sep 21, 2004
  3. Patrice
    Replies:
    2
    Views:
    5,060
    sanjeevsai
    Jul 9, 2009
  4. Karl Seguin
    Replies:
    5
    Views:
    1,949
    i. Wiin
    Sep 21, 2004
  5. =?Utf-8?B?Sm9l?=

    Simple question about 'vbCrLf' is not declared

    =?Utf-8?B?Sm9l?=, Sep 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    387
    =?Utf-8?B?Sm9l?=
    Sep 21, 2004
Loading...

Share This Page