Does anyone know how to use chr in HTMLBody.
I don't know why the chr(13) doesn't give a line return...
Printable View
Does anyone know how to use chr in HTMLBody.
I don't know why the chr(13) doesn't give a line return...
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 />"
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?"
)
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:
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?</p>
<p>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 W3SchoolsCode:<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>
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...
Yeah, it works great!
I think you are not surprised.
Thanks!
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