...

View Full Version : ASP FORM, Text Formatting.



fishbone34
12-14-2004, 04:41 PM
Hello, I have a ASP form that has a text box. I type something in it and create Formatting and submit the results to my MSSQL database.

When I pull the results using a ASP form, The Text box looses its formatting.

Example:

Text Box Entry:
- TEST TEXT
- TEST TEXT
- TEXT TEXT

When I view it using a ASP form, It populates the text box like this:
- TEST TEXT - TEST TEXT - TEXT TEXT

QUESTION: How can I tell the Form/Database to retain the formatting using ASP?

Thank you to anybody who can help.
Chris@thesouthside.net

Chris

glenngv
12-15-2004, 06:22 AM
Put the content inside <pre> </pre> tags

<pre>
<%=rs("theField")%>
</pre>

fishbone34
12-16-2004, 09:05 PM
It works!

Thanks!

Chris

Bullschmidt
12-31-2004, 02:05 AM
And at least for Access databases this can work:

' Convert all vbCrLf to <br>.
' (This is the same as converting Chr(13) & Chr(10) to <br>.)
theFld = Replace(theFld, vbCrLf, "<br>")



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum