RE: newlines in ASP
by Chuck Evans <Chucke(at)captura.com>
|
| Date: |
Fri, 12 May 2000 09:12:35 -0700 |
| To: |
"'Cyanide _7'" <leo7278(at)hotmail.com>, hwg-languages(at)hwg.org |
| |
todo: View
Thread,
Original
|
|
I'm not an ace ASP programmer by any means, but I found when I was creating
text for email replies that sometimes using chr(10) didn't work. The lines
ran together for some people getting the mail. I replaced all the chr(10)'s
with chr(13)'s and it works better now.
So I build lines together into a larger variable I can then put into an
email by doing this:
EmailBodyText = "Sincerely," & Chr(13)
EmailBodyText = EmailBodyText & " " & Chr(13)
EmailBodyText = EmailBodyText & "Chuck Evans" & Chr(13)
EmailBodyText = EmailBodyText & "Captura Software, Inc." & Chr(13)
It all gets dumped into the mail with:
Mailer.BodyText = EmailBodyText
---------------------------------------------------------
Chuck Evans
Web Marketing Manager
Captura Software, Inc.
(425) 424-1155
chucke(at)captura.com
www.captura.com
-----Original Message-----
From: Cyanide _7 [mailto:leo7278(at)hotmail.com]
list!
thanx for all the help with the DIV writing question, but i'd like to
switch gears now as i need advise in another language. for as long as i've
been using ASP, i've never really cared how the source i was writing was
formatted. it had always ended up all on one to a few lines because i could
never figure out how to create a new line in asp. Response.writeln didn't
work and \n didn't work so i took a look at the byte level and found that a
new line in a text editor is represented by the hex values 0D-0A or decimal
13-10. so i tried writing Chr(13) & Chr(10) to the Response object and each
of them created their own new line (each being 0D-0A). so my questions are:
Is there an advantage to writing 10 vs 13 to make a newline?
and
Is there a built in method for doing this in ASP that i've overlooked?
Similarly, i'm using Chr(9) to create a tab. is there a better way to do
this?
at the moment im doing something like this:
<%
Dim nl, tab
nl = Chr(10)
tab = Chr(9)
Response.write "Hello" & nl & tab & "World!" & nl
%>
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.