|
 |
asp_databases thread: table cell replaces carriage return with a space
Message #1 by "Thomas McMillin" <tmcmillin@h...> on Mon, 12 Nov 2001 02:29:12
|
|
Not sure if this is an ADO, Database, or HTML question but here goes...
I'm retrieving a field from an SQL Database that is of Text datatype,
which has embedded carriage returns. When I go to display it in the html
table cell, it appears as a continuous line that is word-wrapped.
Example:
Grocery List:
1)milk
2)eggs
3)bread
4)orange juice
snippet:
<tr><%=rs("description")%></tr>
Displays:
Grocery List: 1)milk 2)eggs 3)bread 4)orange juice
Thanks,
tmcmillin
Message #2 by "Dallas Martin" <dmartin@z...> on Sun, 11 Nov 2001 21:39:49 -0500
|
|
Where are your <td></td> delimiters?
<tr><td><%=rs("Description")%></td></tr>
By the way this is a basic HTML question.
----- Original Message -----
From: "Thomas McMillin" <tmcmillin@h...>
To: "ASP Databases" <asp_databases@p...>
Sent: Monday, November 12, 2001 2:29 AM
Subject: [asp_databases] table cell replaces carriage return with a space
> Not sure if this is an ADO, Database, or HTML question but here goes...
>
> I'm retrieving a field from an SQL Database that is of Text datatype,
> which has embedded carriage returns. When I go to display it in the html
> table cell, it appears as a continuous line that is word-wrapped.
>
> Example:
> Grocery List:
> 1)milk
> 2)eggs
> 3)bread
> 4)orange juice
>
> snippet:
> <tr><%=rs("description")%></tr>
>
> Displays:
> Grocery List: 1)milk 2)eggs 3)bread 4)orange juice
>
> Thanks,
> tmcmillin
>
$subst('Email.Unsub')
>
Message #3 by David Cameron <dcameron@i...> on Mon, 12 Nov 2001 13:53:50 +1100
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C16B25.43D62D1A
Content-Type: text/plain;
charset="iso-8859-1"
Assuming that the missing <td></td> tags were just an error in the email you
typed out, then:
<tr><td><%=Replace(rs("Description"), vbcrlf, "<br>")%></td></tr>
This replaces all carriage return linefeed pairs with <br>.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: Dallas Martin [mailto:dmartin@z...]
Sent: Monday, 12 November 2001 12:40 PM
To: ASP Databases
Subject: [asp_databases] Re: table cell replaces carriage return with a
space
Where are your <td></td> delimiters?
<tr><td><%=rs("Description")%></td></tr>
By the way this is a basic HTML question.
----- Original Message -----
From: "Thomas McMillin" <tmcmillin@h...>
To: "ASP Databases" <asp_databases@p...>
Sent: Monday, November 12, 2001 2:29 AM
Subject: [asp_databases] table cell replaces carriage return with a space
> Not sure if this is an ADO, Database, or HTML question but here goes...
>
> I'm retrieving a field from an SQL Database that is of Text datatype,
> which has embedded carriage returns. When I go to display it in the html
> table cell, it appears as a continuous line that is word-wrapped.
>
> Example:
> Grocery List:
> 1)milk
> 2)eggs
> 3)bread
> 4)orange juice
>
> snippet:
> <tr><%=rs("description")%></tr>
>
> Displays:
> Grocery List: 1)milk 2)eggs 3)bread 4)orange juice
>
> Thanks,
> tmcmillin
>
$subst('Email.Unsub')
>
$subst('Email.Unsub')
Message #4 by "Ken Schaefer" <ken@a...> on Mon, 12 Nov 2001 14:25:59 +1100
|
|
Browsers only render HTML tags, they don't render ASCII characters for
carriage returns or line feeds.
You need to do a replace on vbCrLf with something like <br>
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Thomas McMillin" <tmcmillin@h...>
Subject: [asp_databases] table cell replaces carriage return with a space
: Not sure if this is an ADO, Database, or HTML question but here goes...
:
: I'm retrieving a field from an SQL Database that is of Text datatype,
: which has embedded carriage returns. When I go to display it in the html
: table cell, it appears as a continuous line that is word-wrapped.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #5 by "Drew, Ron" <RDrew@B...> on Mon, 12 Nov 2001 08:30:02 -0500
|
|
Move to a variable...or put it in one statement
var1=rs("description")
var2 = Replace(var1, vbCRLF, "<BR>")
-----Original Message-----
From: Thomas McMillin [mailto:tmcmillin@h...]
Sent: Sunday, November 11, 2001 9:29 PM
To: ASP Databases
Subject: [asp_databases] table cell replaces carriage return with a space
Not sure if this is an ADO, Database, or HTML question but here goes...
I'm retrieving a field from an SQL Database that is of Text datatype,
which has embedded carriage returns. When I go to display it in the html
table cell, it appears as a continuous line that is word-wrapped.
Example:
Grocery List:
1)milk
2)eggs
3)bread
4)orange juice
snippet:
<tr><%=rs("description")%></tr>
Displays:
Grocery List: 1)milk 2)eggs 3)bread 4)orange juice
Thanks,
tmcmillin
---
You are currently subscribed to asp_databases as: RDrew@B... To
unsubscribe send a blank email to $subst('Email.Unsub')
Message #6 by Greg Griffiths <griffiths@x...> on Wed, 21 Nov 2001 21:24:54 +0000
|
|
the <tr> tag is a table row tag rather than a table cell tag. Try :
<tr>
<td>
<%=rs("description")%>
</td>
</tr>
At 02:29 12/11/01 +0000, you wrote:
>Not sure if this is an ADO, Database, or HTML question but here goes...
>
>I'm retrieving a field from an SQL Database that is of Text datatype,
>which has embedded carriage returns. When I go to display it in the html
>table cell, it appears as a continuous line that is word-wrapped.
>
>Example:
>Grocery List:
>1)milk
>2)eggs
>3)bread
>4)orange juice
>
>snippet:
><tr><%=rs("description")%></tr>
>
>Displays:
>Grocery List: 1)milk 2)eggs 3)bread 4)orange juice
>
>Thanks,
>tmcmillin
>
Message #7 by "Reynolds, Josh" <Josh.Reynolds@e...> on Mon, 26 Nov 2001 09:25:44 -0500
|
|
What you'll probably want to do is replace the carriage returns coming
out of the database with <br> tags. Replace(rs("FieldName"), vbcrlf,
"<br>") would probably do it.
josh
----- Original Message -----
From: "Greg Griffiths" <griffiths@x...>
To: "ASP Databases" <asp_databases@p...>
Sent: Wednesday, November 21, 2001 4:24 PM
Subject: [asp_databases] Re: table cell replaces carriage return with a
space
> the <tr> tag is a table row tag rather than a table cell tag. Try :
>
> <tr>
> <td>
> <%=3Drs("description")%>
> </td>
> </tr>
>
>
> At 02:29 12/11/01 +0000, you wrote:
> >Not sure if this is an ADO, Database, or HTML question but here
goes...
> >
> >I'm retrieving a field from an SQL Database that is of Text
datatype,
> >which has embedded carriage returns. When I go to display it in the
html
> >table cell, it appears as a continuous line that is word-wrapped.
> >
> >Example:
> >Grocery List:
> >1)milk
> >2)eggs
> >3)bread
> >4)orange juice
> >
> >snippet:
> ><tr><%=3Drs("description")%></tr>
> >
> >Displays:
> >Grocery List: 1)milk 2)eggs 3)bread 4)orange juice
> >
> >Thanks,
> >tmcmillin
> >
griffiths@x...
$subst('Email.Unsub')
>
>
>
josh.reynolds@e...
$subst('Email.Unsub')
|
|
 |