vbCrLf

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dancer

    #1

    vbCrLf

    What is this? vbCrLf


  • Juan T. Llibre

    #2
    Re: vbCrLf

    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" <dancer@microso ft.comwrote in message news:us6dUSlkHH A.4936@TK2MSFTN GP03.phx.gbl...
    What is this? vbCrLf
    >

    Comment

    • Ross Culver

      #3
      Re: vbCrLf

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

      "dancer" <dancer@microso ft.comwrote in message
      news:us6dUSlkHH A.4936@TK2MSFTN GP03.phx.gbl...
      What is this? vbCrLf
      >

      Comment

      • dancer

        #4
        Re: vbCrLf

        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" <nomailreplies@ nowhere.comwrot e in message
        news:%23Rl4HUlk HHA.4188@TK2MSF TNGP02.phx.gbl. ..
        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" <dancer@microso ft.comwrote in message
        news:us6dUSlkHH A.4936@TK2MSFTN GP03.phx.gbl...
        >What is this? vbCrLf
        >>
        >
        >

        Comment

        • David

          #5
          Re: vbCrLf

          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.FOCUSPortals.com - Local franchises available


          "dancer" <dancer@microso ft.comwrote in message
          news:O0Uq2plkHH A.3472@TK2MSFTN GP04.phx.gbl...
          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" <nomailreplies@ nowhere.comwrot e in message
          news:%23Rl4HUlk HHA.4188@TK2MSF TNGP02.phx.gbl. ..
          >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" <dancer@microso ft.comwrote in message
          >news:us6dUSlkH HA.4936@TK2MSFT NGP03.phx.gbl.. .
          >>What is this? vbCrLf
          >>>
          >>
          >>
          >
          >

          Comment

          • dancer

            #6
            Re: vbCrLf

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


            "David" <david.colliver .NEWS@revilloc. REMOVETHIS.comw rote in message
            news:ed7Nz3lkHH A.492@TK2MSFTNG P04.phx.gbl...
            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.FOCUSPortals.com - Local franchises available
            >
            >
            "dancer" <dancer@microso ft.comwrote in message
            news:O0Uq2plkHH A.3472@TK2MSFTN GP04.phx.gbl...
            >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" <nomailreplies@ nowhere.comwrot e in message
            >news:%23Rl4HUl kHHA.4188@TK2MS FTNGP02.phx.gbl ...
            >>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" <dancer@microso ft.comwrote in message
            >>news:us6dUSlk HHA.4936@TK2MSF TNGP03.phx.gbl. ..
            >>>What is this? vbCrLf
            >>>>
            >>>
            >>>
            >>
            >>
            >
            >

            Comment

            • Mark Rae

              #7
              Re: vbCrLf

              "dancer" <dancer@microso ft.comwrote in message
              news:O0Uq2plkHH A.3472@TK2MSFTN GP04.phx.gbl...
              Then why do I not get new lines with this code?
              Because vbCrLf isn't HTML... :-)

              Use <br /instead.


              --


              Comment

              • Juan T. Llibre

                #8
                Re: vbCrLf

                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" <dancer@microso ft.comwrote in message news:O0Uq2plkHH A.3472@TK2MSFTN GP04.phx.gbl...
                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" <nomailreplies@ nowhere.comwrot e in message
                news:%23Rl4HUlk HHA.4188@TK2MSF TNGP02.phx.gbl. ..
                >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" <dancer@microso ft.comwrote in message news:us6dUSlkHH A.4936@TK2MSFTN GP03.phx.gbl...
                >>What is this? vbCrLf
                >>>
                >>
                >>
                >
                >

                Comment

                • Alexey Smirnov

                  #9
                  Re: vbCrLf

                  On May 9, 7:44 pm, "dancer" <dan...@microso ft.comwrote:
                  But you don't use <brin VB do you? Only in HTML?
                  >
                  when you have

                  objMM.BodyForma t = MailFormat.Html

                  you have to use HTML - so, you have to use a <brtag

                  when you will change

                  objMM.BodyForma t = MailFormat.Text

                  you can use vbCrLf to make new lines.

                  In this case your email message will be sent as a plain text.

                  Comment

                  • dancer

                    #10
                    Re: vbCrLf

                    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 = xxxxxx@xxxxxx.c om

                    objMM.From = "xxxxxxxx@xxxxx xxx.com"
                    'send in html format
                    objMM.BodyForma t = MailFormat.Html
                    'Set the priority - options are High, Low, and Normal
                    objMM.Priority = MailPriority.No rmal

                    '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.SmtpSe rver = ""
                    'Now, to send the message, use the Send method of the SmtpMail class
                    SmtpMail.Send(o bjMM)
                    panelSendEmail. Visible = false
                    panelMailSent.V isible = true
                    End Sub



                    "Mark Rae" <mark@markNOSPA Mrae.netwrote in message
                    news:uR0MZHmkHH A.4248@TK2MSFTN GP06.phx.gbl...
                    "dancer" <dancer@microso ft.comwrote in message
                    news:O0Uq2plkHH A.3472@TK2MSFTN GP04.phx.gbl...
                    >
                    >Then why do I not get new lines with this code?
                    >
                    Because vbCrLf isn't HTML... :-)
                    >
                    Use <br /instead.
                    >
                    >
                    --
                    http://www.markrae.net

                    Comment

                    • Juan T. Llibre

                      #11
                      Re: vbCrLf

                      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" <dancer@microso ft.comwrote in message news:Oev%23uNmk HHA.4312@TK2MSF TNGP02.phx.gbl. ..
                      >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 = xxxxxx@xxxxxx.c om
                      >
                      objMM.From = "xxxxxxxx@xxxxx xxx.com"
                      'send in html format
                      objMM.BodyForma t = MailFormat.Html
                      'Set the priority - options are High, Low, and Normal
                      objMM.Priority = MailPriority.No rmal
                      >
                      '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.SmtpSe rver = ""
                      'Now, to send the message, use the Send method of the SmtpMail class
                      SmtpMail.Send(o bjMM)
                      panelSendEmail. Visible = false
                      panelMailSent.V isible = true
                      End Sub
                      >
                      >
                      >
                      "Mark Rae" <mark@markNOSPA Mrae.netwrote in message news:uR0MZHmkHH A.4248@TK2MSFTN GP06.phx.gbl...
                      >"dancer" <dancer@microso ft.comwrote in message news:O0Uq2plkHH A.3472@TK2MSFTN GP04.phx.gbl...
                      >>
                      >>Then why do I not get new lines with this code?
                      >>
                      >Because vbCrLf isn't HTML... :-)
                      >>
                      >Use <br /instead.
                      >>
                      >>
                      >--
                      >http://www.markrae.net
                      >
                      >

                      Comment

                      • dancer

                        #12
                        Re: vbCrLf

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


                        "Juan T. Llibre" <nomailreplies@ nowhere.comwrot e in message
                        news:%23aO7%23L mkHHA.3388@TK2M SFTNGP03.phx.gb l...
                        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" <dancer@microso ft.comwrote in message
                        news:O0Uq2plkHH A.3472@TK2MSFTN GP04.phx.gbl...
                        >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" <nomailreplies@ nowhere.comwrot e in message
                        >news:%23Rl4HUl kHHA.4188@TK2MS FTNGP02.phx.gbl ...
                        >>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" <dancer@microso ft.comwrote in message
                        >>news:us6dUSlk HHA.4936@TK2MSF TNGP03.phx.gbl. ..
                        >>>What is this? vbCrLf
                        >>>>
                        >>>
                        >>>
                        >>
                        >>
                        >
                        >

                        Comment

                        • =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=

                          #13
                          Re: vbCrLf

                          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" <nomailreplies@ nowhere.comwrot e in message
                          news:%23aO7%23L mkHHA.3388@TK2M SFTNGP03.phx.gb l...
                          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" <dancer@microso ft.comwrote in message
                          news:O0Uq2plkHH A.3472@TK2MSFTN GP04.phx.gbl...
                          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" <nomailreplies@ nowhere.comwrot e in message
                          news:%23Rl4HUlk HHA.4188@TK2MSF TNGP02.phx.gbl. ..
                          >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" <dancer@microso ft.comwrote in message
                          >news:us6dUSlkH HA.4936@TK2MSFT NGP03.phx.gbl.. .
                          >>What is this? vbCrLf
                          >>>
                          >>
                          >>
                          >
                          >
                          >
                          >
                          >

                          Comment

                          • David

                            #14
                            Re: vbCrLf

                            ROFLMAO

                            :-D

                            --
                            Best regards,
                            Dave Colliver.

                            ~~
                            http://www.FOCUSPortals.com - Local franchises available


                            "Peter Bromberg [C# MVP]" <pbromberg@yaho o.yabbadabbadoo .comwrote in
                            message news:A3D62E3B-4C6A-4AC4-8BF3-5DFD832B136A@mi crosoft.com...
                            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" <nomailreplies@ nowhere.comwrot e in message
                            >news:%23aO7%23 LmkHHA.3388@TK2 MSFTNGP03.phx.g bl...
                            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" <dancer@microso ft.comwrote in message
                            news:O0Uq2plkHH A.3472@TK2MSFTN GP04.phx.gbl...
                            >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" <nomailreplies@ nowhere.comwrot e in message
                            >news:%23Rl4HUl kHHA.4188@TK2MS FTNGP02.phx.gbl ...
                            >>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" <dancer@microso ft.comwrote in message
                            >>news:us6dUSlk HHA.4936@TK2MSF TNGP03.phx.gbl. ..
                            >>>What is this? vbCrLf
                            >>>>
                            >>>
                            >>>
                            >>
                            >>
                            >
                            >
                            >>
                            >>
                            >>

                            Comment

                            • Mark Rae

                              #15
                              Re: vbCrLf

                              "Peter Bromberg [C# MVP]" <pbromberg@yaho o.yabbadabbadoo .comwrote in
                              message news:A3D62E3B-4C6A-4AC4-8BF3-5DFD832B136A@mi crosoft.com...
                              Boy, I am too! Was getting a little worried there. :-)
                              I was getting ready to sell my flat and head for the hills...


                              --


                              Comment

                              Working...