format text retreived from a database

Results 1 to 2 of 2

Thread: format text retreived from a database

  1. #1
    jiboomba Guest

    Default format text retreived from a database

    i have a text area in an asp page which saves the description of an item and it is saved in a database.<BR><BR>But when it is retreived it doesnot have the same format as what it was entered.. i displays as continuous text.. for eg. i have 2 paragraphs in the text area description saved inthe database but when retreived it is displayed as just one paragraph.<BR><BR>The same also has to be exported to a power point slide .. <BR><BR>Please HELP<BR><BR>Any help in this regard will be greatly appreciated..<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Add HTML tags

    You can run through the textarea and every time you reach a characater that is a returh characater (chr(13)) you can insert a <BR> tag....<BR><BR>strfield = request("textentered")<BR>outstr = ""<BR>while len(strfield) &#062; 0<BR> if left(strfield,1) = chr(13) then<BR> outstr = outstr & "<BR>"<BR> else<BR> outstr = outstr & left(strfield,1)<BR> end if<BR> strfield = right(strfield,len(strfield)-1)<BR>loop<BR>response.write(outstr) &#039;This can easily be changed to page the<BR> &#039;Text into a database.<BR><BR>When you go back to edit the field, you will want to do something similar to remove the <BR> tags from the message area...<BR><BR>-- whol<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