|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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
Show quote
"raj chahal" <i***@digitise.info> wrote in message sText = {your text on multiple lines}news:#tnXXYQSGHA.5552@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. <%=Replace(sText,vbCrLf,"<br>")%> or <pre> <%=sText%> </pre> 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.. Show quote "McKirahan" <N***@McKirahan.com> wrote in message news:TKWdnQE-muaHPYTZnZ2dnUVZ_s-dnZ2d@comcast.com... > "raj chahal" <i***@digitise.info> wrote in message > news:#tnXXYQSGHA.5552@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> > > > > >
Show quote
"raj chahal" <i***@digitise.info> wrote in message [snip]news:OTMq9YaSGHA.196@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" <N***@McKirahan.com> wrote in message > news:TKWdnQE-muaHPYTZnZ2dnUVZ_s-dnZ2d@comcast.com... > > "raj chahal" <i***@digitise.info> wrote in message > > news:#tnXXYQSGHA.5552@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. 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 IfNext sText = Join(aTemp,"<br>") %> <%=sText%> The above is untested -- let me know if there's a problem. |
|||||||||||||||||||||||