469,900 Members | 1,632 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,900 developers. It's quick & easy.

displaying text on asp page from access

Hi there

I've created a db field with Memo type, and I have stored some text with
carriage returns (no html) So the 3 words start on a differnt line. In
access this displays correctly ( each word starts on a new line).
However when I display these on a web page all the words appear on the same
line.

I need the words to be displayed on a seperate line.

ANY HELP APPECIATED.

thanks
Mar 16 '06 #1
3 1371
"raj chahal" <in**@digitise.info> wrote in message
news:#t**************@TK2MSFTNGP14.phx.gbl...
Hi there

I've created a db field with Memo type, and I have stored some text with
carriage returns (no html) So the 3 words start on a differnt line. In
access this displays correctly ( each word starts on a new line).
However when I display these on a web page all the words appear on the same line.

I need the words to be displayed on a seperate line.

ANY HELP APPECIATED.


sText = {your text on multiple lines}

<%=Replace(sText,vbCrLf,"<br>")%>

or

<pre>
<%=sText%>
</pre>

Mar 16 '06 #2
Thanks for your help.

Can I also give the user to make a piece of text bold without a 'rich text
editor'. If not any recommendations?
Thanks in advance..

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:TK******************************@comcast.com. ..
"raj chahal" <in**@digitise.info> wrote in message
news:#t**************@TK2MSFTNGP14.phx.gbl...
Hi there

I've created a db field with Memo type, and I have stored some text with
carriage returns (no html) So the 3 words start on a differnt line. In
access this displays correctly ( each word starts on a new line).
However when I display these on a web page all the words appear on the

same
line.

I need the words to be displayed on a seperate line.

ANY HELP APPECIATED.


sText = {your text on multiple lines}

<%=Replace(sText,vbCrLf,"<br>")%>

or

<pre>
<%=sText%>
</pre>


Mar 17 '06 #3
"raj chahal" <in**@digitise.info> wrote in message
news:OT*************@TK2MSFTNGP10.phx.gbl...
Thanks for your help.

Can I also give the user to make a piece of text bold without a 'rich text
editor'. If not any recommendations?
Thanks in advance..

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:TK******************************@comcast.com. ..
"raj chahal" <in**@digitise.info> wrote in message
news:#t**************@TK2MSFTNGP14.phx.gbl...
Hi there

I've created a db field with Memo type, and I have stored some text with carriage returns (no html) So the 3 words start on a differnt line. In
access this displays correctly ( each word starts on a new line).
However when I display these on a web page all the words appear on the

same
line.

I need the words to be displayed on a seperate line.


[snip]

You'd have to know which word or words they want to be in bold.

One way is to have them start each line they want in bold with a period;
(or some other special character -- change the value of "cCHR" to it).

Then you could do this:

<%
Const cCHR = "."
sText = {your text on multiple lines}
aTemp = Split(sText,vbCrLf)
For iTemp = 0 To UBound(aTemp)
sTemp = aTemp(iTemp)
If Left(sTemp,1) = cCHR Then
aTemp(iTemp) = "<b>" & Mid(sTemp,2) & "</b>"
End If
Next
sText = Join(aTemp,"<br>")
%>

<%=sText%>

The above is untested -- let me know if there's a problem.
Mar 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by matthiasjanes | last post: by
14 posts views Thread by Rahul Chatterjee | last post: by
2 posts views Thread by Carole MacDonald | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.