[thelist] Textarea, hard returns, ASP, and CDOSYS

Tab Alleman Tab.Alleman at MetroGuide.com
Thu Oct 23 13:03:38 CDT 2003


Joel D Canfield wrote:
>> Does anybody here know the best way to get hard returns
>> entered into a text field to translate into vbCrLf's in an ASP
>> script? 
> 
> Do you mean a textarea? In my experience, the come *out* as VbCrLf - I
> normally do a VbCrLf -> <br /> replace when dumping to a db or
> something. Odd that it shouldn't be carrying across to the e-mail. I
> use VbCrLf to create line breaks in automated e-mails, so again, it
> oughta be working.

Thanks to all who helped (or at least tried to).. 

The hard returns were, in fact, translating to vbCrLf in the ASP script
that received them.  But for some reason, those weren't being translated
into New Line/Carriage Returns, whatever you'd like to call 'em by
CDOSYS (sending plain text mail, not HTML). 

I eventually got the results I wanted with:

strText = Replace(strText, vbCrLf, Chr(10))

...no kidding.  That did the trick.  Go figure.

-Tab


More information about the thelist mailing list