|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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) |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > help plzzzz |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|