Results 1 to 6 of 6

Thread: HTMLBody chr

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    HTMLBody chr

    Does anyone know how to use chr in HTMLBody.
    I don't know why the chr(13) doesn't give a line return...

  2. #2
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: HTMLBody chr

    HTML is different, you can't specify line breaks like that, its not like notepad, and that character doesn't move text onto a new line.. everything is contained within blocks, like <p>.. </p> tags, header tags, etc...

    An equivalent of a "break" in HTML is "<br>", or the more correct "<br />"

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: HTMLBody chr

    Can you give me an example of it?
    Say I want to show these two lines in HTMLBody how does it look like?



    (normaly in VB.Net I code this:
    "Can you give me an example of it?" & chr(13) & _
    "Say I want to show these two lines in HTMLBody how does it look like?"
    )

  4. #4
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: HTMLBody chr

    well first of all you need to enclose all your text in the appropriate HTML tags. All text, in order to be valid html, should be enclosed in some sort of markup tag.

    You could put the two lines as two different paragraphs without using a "break", like below:
    Code:
    <p>Can you give me an example of it?</p>
    <p>Say I want to show these two lines in HTMLBody how does it look like?</p>
    Or, if you wish to use a "break", you could seperate the lines with a <br /> tag, within a paragraph tag...
    Code:
    <p>Can you give me an example of it?<br />
    Say I want to show these two lines in HTMLBody how does it look like?</p>
    This is basic HTML coding info... you may wish to read up a little on it, try W3Schools

    Note: it also doesnt matter if the text all resides on one line or multiple lines, as the browser does not pay attention to it, and will render it the same way...

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: HTMLBody chr

    Yeah, it works great!
    I think you are not surprised.
    Thanks!

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: HTMLBody chr

    you can create and edit HTML files in the VS.NET IDE.

    you can just layout the HTML how you want it using the WYSIWYG editor, and then look at the HTML code it generated, to see how HTML works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width