nbcrlf not working

Results 1 to 4 of 4

Thread: nbcrlf not working

  1. #1
    Dhawal Guest

    Default nbcrlf not working

    I am trying to use a winsock component to send a HTTP header request for that I have to create a string with nbcrlf constants.<BR>But the problem is that the string constants like nbcrlf, chr(13), nbcr etc. are just not working and I am unable to give the line breaks. I have tried everything but am unable to give linebreaks in VBScript.<BR>Can someone help me out?

  2. #2
    paul_merton @ hotmail.com Guest

    Default RE: nbcrlf not working

    I would imagine your problem here is caused by the fact that the carriage return / linefeed constant is called vbCrLf and not nbCrLf.<BR><BR>Thus by using nbCrLf (and without Option Explicit declared), you are referencing an empty string.<BR><BR>Replace all these with the vb prefix instead of nb and all should work properly.<BR><BR>Ie nbCrLf --&#062; vbCrLf<BR>and nbCr --&#062; vbCr<BR><BR>But I am at a loss to explain your claim of chr(13) not working... I cannot see why.<BR><BR>Paul.

  3. #3
    Dhawal Guest

    Default RE: nbcrlf not working

    I think I have made a typing mistake I was using vbcrlf only not nbcrlf still it is not working.<BR>Nevertheless thanks for the help<BR><BR>

  4. #4
    Join Date
    Dec 1969

    Default RE: nbcrlf not working

    Scenario: I have a record in a table which has been populated from a textarea. This has carriage returns in it.<BR>To display this on the page I replace chr(13) & chr(10) with "<BR>".<BR><BR>&#060;%<BR>vCRLF = chr(13) & chr(10)<BR>response.write Replace(objRec("fieldname"), vCRLF, "<BR>")<BR>%&#062;<BR><BR>Hope this is what you were after.

Posting Permissions

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