New Paragraph frpm Access

M

Melvin

Database result from a table in MSAccess doesn't give me
new paragraphs. The text shown in the .asp page is just
one paragraph although the text in the field (PM) have
several paragraphs.
When i look at the result in Access I can see all the
paragraphs but not at the web page.
What to do ?
 
K

Kevin Spencer

What you're describing is not "paragraphs" per se, but line breaks. Line
breaks follow different rules in HTML. An HTML document can have any number
of "white space" characters in it (including line breaks, spaces, tabs,
etc), and the rules of HTML state that all "white space" characters are
treated as a single space in the browser, regardless of the number of
consecutive "white space" characters. This is how you're able to view your
HTML document in a text editor without having the lines run infintely across
the document. In HTML, a line break is indicated with a "<br>" tag. To
display data with line breaks in it, you therefore need to replace each line
break character in the value with the HTML "<br>" tag. In ASP (VBScript)
this is done using the Replace() function. Example:

<%Response.Wrtite Replace(SomeValue, VbCrLf, "<br>")%>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top