ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 18th, 2003, 09:19 PM
sumicooldude sumicooldude is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 48 sumicooldude User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via Yahoo to sumicooldude
Unhappy help plzzzz

i hv created a memo field in access database and as a front end ive kept textarea(form field element) for insertin the data in the database.

the data is inserted properly, but the problem is when i insert
the data i press enter to break lines inside textarea (refer
Fig: 1), but when i retrieve the same data on the web page
simply by response.write method it does not shows those line
breaks (refer Fig: 2) but at the same time when i retrieve
the same data in a textarea component it shows exactly the same
output as ive entered, hope i explained
myself clearly, u can chk the jpg files that i hope will make more
clear please advice if there is some method of retrievein the data as i want (refer Fig: 3)
Attached Images
File Type: jpg problem.jpg (36.0 KB, 214 views)

Reply With Quote
  #2  
Old February 18th, 2003, 09:59 PM
ramz ramz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Juiz de Fora - MG- Brazil
Posts: 93 ramz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to ramz Send a message via MSN to ramz
To fix this problem, use this function:

Function change2br(ByVal strText)
strText = Replace(strText,chr(13),"<br>")
change2br = strText
End Function

When you want to print, call this function.
Call change2br(myText)
__________________
Regards,
Ramiro Varandas Jr.

Reply With Quote
  #3  
Old February 19th, 2003, 08:28 PM
DeviantScripter DeviantScripter is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 22 DeviantScripter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yes, the above post has the right idea. What you're aiming to do is essentially replace all "line breaks" with a symbol inside your database. Then you can convert that symbol back to a line break when you're outputting it to your webpage.

Reply With Quote
  #4  
Old February 21st, 2003, 08:01 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Actually, ramz was spot on.

You only want to change the data when printing, not when storing it in the DB. The string already has a "symbol" in it as it gets saved - the line-break character.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > help plzzzz


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT