I have a database-driven web site that uses SQL Server for the back end, ASP
for the wide front end and Access for the local front end. I have nvarchar
fields that sometimes include paragraph breaks. There is no special command
("Enter" works fine) to force the paragraph break in Access, and the text
boxes on the web site recognize these paragraph breaks. I use text boxes
only when I am making editing available to the qualified user. When I want
to display the text in read only, I simply populate an html table cell with
the text. The problem is that the html table cell does not recognize the
paragraph breaks, so the text is displayed in run-on fashion.
I am assuming that I could use the REPLACE function at the point of display
to recognize and either replace or insert a paragraph break command that
html would recognize, but I have no idea either what to look for or what to
replace it with. Can you help?
p.s. I like the html table cell display because it grows to the size of the
text, which the text box does not (or at least I don't know how to make it
do that).
Thanks 5 5431
Response.Write Replace(MyText,vbCrlf,"<br>")
Response.Write Replace(MyText,Chr(10)&Chr(13),"<br>")
or a variant
You need to replace with "<br>". See http://www.aspfaq.com/2188
-- http://www.aspfaq.com/
(Reverse address to reply.)
"WC Justice" <BJ******@wcje.com> wrote in message
news:sQ******************@bignews3.bellsouth.net.. . I have a database-driven web site that uses SQL Server for the back end,
ASP for the wide front end and Access for the local front end. I have
nvarchar fields that sometimes include paragraph breaks. There is no special
command ("Enter" works fine) to force the paragraph break in Access, and the text boxes on the web site recognize these paragraph breaks. I use text boxes only when I am making editing available to the qualified user. When I
want to display the text in read only, I simply populate an html table cell
with the text. The problem is that the html table cell does not recognize the paragraph breaks, so the text is displayed in run-on fashion.
I am assuming that I could use the REPLACE function at the point of
display to recognize and either replace or insert a paragraph break command that html would recognize, but I have no idea either what to look for or what
to replace it with. Can you help?
p.s. I like the html table cell display because it grows to the size of
the text, which the text box does not (or at least I don't know how to make it do that).
Thanks
sTheText = oYourRecordset.Fields.Item("yourColumn").Value
Response.Write Replace(sTheText, vbCrLf, "<br>")
Ray at work
"WC Justice" <BJ******@wcje.com> wrote in message
news:sQ******************@bignews3.bellsouth.net.. . I have a database-driven web site that uses SQL Server for the back end,
ASP for the wide front end and Access for the local front end. I have
nvarchar fields that sometimes include paragraph breaks. There is no special
command ("Enter" works fine) to force the paragraph break in Access, and the text boxes on the web site recognize these paragraph breaks. I use text boxes only when I am making editing available to the qualified user. When I
want to display the text in read only, I simply populate an html table cell
with the text. The problem is that the html table cell does not recognize the paragraph breaks, so the text is displayed in run-on fashion.
I am assuming that I could use the REPLACE function at the point of
display to recognize and either replace or insert a paragraph break command that html would recognize, but I have no idea either what to look for or what
to replace it with. Can you help?
p.s. I like the html table cell display because it grows to the size of
the text, which the text box does not (or at least I don't know how to make it do that).
Thanks
Replace(MyText,vbCrlf,"<br>") worked perfectly...thanks to all who
responded!
"Gérard Leclercq" <ge*************@pas-de-mail.fr> wrote in message
news:DX*******************@phobos.telenet-ops.be... Response.Write Replace(MyText,vbCrlf,"<br>") Response.Write Replace(MyText,Chr(10)&Chr(13),"<br>") or a variant
"WC Justice" <BJ******@wcje.com> wrote in message
news:sQ******************@bignews3.bellsouth.net.. . I have a database-driven web site that uses SQL Server for the back end,
ASP for the wide front end and Access for the local front end. I have
nvarchar fields that sometimes include paragraph breaks. There is no special
command ("Enter" works fine) to force the paragraph break in Access, and the text boxes on the web site recognize these paragraph breaks. I use text boxes only when I am making editing available to the qualified user. When I
want to display the text in read only, I simply populate an html table cell
with the text. The problem is that the html table cell does not recognize the paragraph breaks, so the text is displayed in run-on fashion.
I am assuming that I could use the REPLACE function at the point of
display to recognize and either replace or insert a paragraph break command that html would recognize, but I have no idea either what to look for or what
to replace it with. Can you help?
p.s. I like the html table cell display because it grows to the size of
the text, which the text box does not (or at least I don't know how to make it do that).
Thanks
If you need to preserve the line returns, one solution is put the <pre>
around the data
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ( http://www.grisoft.com).
Version: 6.0.817 / Virus Database: 555 - Release Date: 12/15/2004 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: eddie wang |
last post by:
What is CRLF? Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
|
by: McKirahan |
last post by:
How would I use a regular expression to remove all trailing Carriage Returns
and Line Feeds (%0D%0A) from a textarea's value? Thanks in advance.
Also, are they any great references for learning...
|
by: McKirahan |
last post by:
I'd like to use regular expressions to remove extraneous Carriage Return
Line Feeds (CrLf) from a textarea before the form is submitted.
I'd like to remove all trailing CrLf's and convert all...
|
by: Jon |
last post by:
Hi...
I'm getting stumped over the something that MUST be simple...basically, I'm
trying to replace the characters 0D0A with a crlf, using Regex.Replace().
The problem is, the replaced string...
|
by: Jack Wright |
last post by:
Dear All,
In a multiline field if I enter the following way:
Mangesh
Anant
Kodilkar
There is a carriage return after each word.
Now when I press save,it loses the CRLF characters. This is not...
|
by: Michael Persaud |
last post by:
Hi All,
Im trying to have a few strings presented in a LABEL. However the CRLF is
not working.
eg str = str1 + crlf + str2 + crlf + str3
label.text= str
Do i need to declare the crlf as a...
|
by: Andrew |
last post by:
Hello. I am working with very large files in my .NET project (1
million plus records). Some of these files do not have crlf's, which
makes it very hard to read the file without a layout or record...
|
by: Tomas |
last post by:
When I use a __doPostBack to submit a page to the server the last textbox on
the page always contains a CRLF. I've used HttpRequest.SaveAs to dump the
entire request (IIS 6) to disk and the body of...
|
by: rmgalante |
last post by:
I was developing a large web site in VS 2005 as a web site project. I
was having problems with the VS 2005 publish tool. It was slow, and
provided no feedback. It has other issues as outlined...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |