Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-14-2004, 03:41 PM   PM User | #1
fishbone34
New Coder

 
Join Date: Jul 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
fishbone34 is an unknown quantity at this point
ASP FORM, Text Formatting.

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
fishbone34 is offline   Reply With Quote
Old 12-15-2004, 05:22 AM   PM User | #2
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
Put the content inside <pre> </pre> tags

<pre>
<%=rs("theField")%>
</pre>
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv is offline   Reply With Quote
Old 12-16-2004, 08:05 PM   PM User | #3
fishbone34
New Coder

 
Join Date: Jul 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
fishbone34 is an unknown quantity at this point
It works!

Thanks!

Chris
fishbone34 is offline   Reply With Quote
Old 12-31-2004, 01:05 AM   PM User | #4
Bullschmidt
Regular Coder

 
Join Date: Aug 2002
Location: USA
Posts: 478
Thanks: 0
Thanked 2 Times in 2 Posts
Bullschmidt is an unknown quantity at this point
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>")
__________________
J. Paul Schmidt
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips
Bullschmidt is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:07 PM.


Advertisement
Log in to turn off these ads.