Formatting nicely from a database

Results 1 to 3 of 3

Thread: Formatting nicely from a database

  1. #1
    Julie A. Guest

    Default Formatting nicely from a database

    I have a form which allow users to input lots of text (with tabs, returns, etc) into certain fields. When submitted, the form puts everything into the appropriate fields into the database.<BR>My problem is that when people search for certain records, i have that recordset written to the screen with response.write. The words are all there, but I&#039ve lost the formatting of returns and tabs and whatnot. Is there anyway to keep that formatting when entering fields into the database?

  2. #2
    Join Date
    Dec 1969

    Default HTML formatting...probably not DB

    The formatting is *probably* still there!<BR><BR>To find out if it is, do a "View &#124 Source" in your browser to see the actual HTML that is displaying the retrieved text.<BR><BR>Are the tabs and end-of-lines and and and still there? Bet they are!<BR><BR>The problem is nothing to do with ASP. HTML does not retain the "raw text" and insists on trying to reformat it.<BR><BR>You can *possibly* get close to the original form by doing something like this:<BR><BR>&#060;PRE&#062;<BR>&#060;% = RS("thePrettyTextField") %&#062;<BR>&#060;/PRE&#062;<BR><BR>The &#060;PRE&#062; tag tells HTML to take the following text as "PREformatted" and *not* do any further formatting.<BR><BR>You should go get a good book on HTML and learn about other possible ways to retain or reproduce or enhance the formatting.<BR><BR>

  3. #3
    Julie A. Guest

    Default RE: HTML formatting...probably not DB

    Thank you much! The PRE tag works perfect for what I need. I was fearing the fix would be something long and complicated... I&#039m glad it wasn&#039t anything terrible at all

Posting Permissions

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