convert carriage return to <BR>

Results 1 to 2 of 2

Thread: convert carriage return to

  1. #1
    Corin Guest

    Default convert carriage return to

    Anyone know the best way to convert a carriage return entered into a form, into a <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: convert carriage return to <BR>

    &nbsp;<BR>txt = Replace( Request.Form("whatever"), vbNewLine, "&LT;BR&#062;" )<BR><BR>Note that this works in most cases, but someday you might run into a browser that sends back only a vbLF character, without the preceding vbCR character. If you want to be *really* paranoid, you can do this:<BR><BR>txt = Replace( Request.Form("whatever"), vbCR, "" ) &#039 get rid of CR&#039s!<BR>txt = Replace( txt, vbLF, "&LT;BR&#062;" ) &#039 then convert LF&#039s to &LT;BR&#062;&#039s!<BR><BR><BR>

Posting Permissions

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