maintain carriage returns from DBase to HTML (asp used)

Results 1 to 3 of 3

Thread: maintain carriage returns from DBase to HTML (asp used)

  1. #1
    Shawn P Guest

    Default maintain carriage returns from DBase to HTML (asp used)

    Problem: I have entered in data into a text field in a dbase with carriage returns present. I want to now read this back into html using asp with the end of line characters present (reading the field into a string terminates all EOL characters). Can this be done? If so, how?

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: maintain carriage returns from DBase to HTML (asp used)

    HTML doesn&#039t interpret newline characters as carriage returns. Rather, HTML only displays a carriage return if it encounters the <BR> tag. So, what you will need to do is simply replace all carriage returns with <BR>.<BR><BR>&#039This string will hold the value of the text<BR>Dim strBlah<BR>strBlah = objRS("SomeTextField")<BR>strBlah = Replace(strBlah, vbCrLf, "<BR>")<BR><BR>That should do it! You can read a technical explanation of the Replace function at:<BR>http://msdn.microsoft.com/scripting/default.htm?/scripting/VBScript/doc/vsfctReplace.htm<BR><BR>Happy Programming! :)

  3. #3
    Nathan Pond Guest

    Default RE: maintain carriage returns from DBase to HTML (asp used)

    Seems as if there is a bug in the web board, the &lt;BR&gt; tag is taken literally. :-)<BR><BR>Nathan<BR><BR>P.S. I had the same problem when I answered the same question yesterday :-)

Posting Permissions

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