Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Fomatted Output


Message #1 by "Matthew Lohr " <mlohr@t...> on Fri, 26 Oct 2001 15:21:33 -0400
I am trying to format the output from a database.  I have no control over 

how the information in entered.  When I display it on the screen I want it 

to look exactly as it was entered into the database.  I know I can do this 

with a textarea but that makes someone scroll of the data is too long and 

wastes space if it is too short.  How can i format this with line breaks

Message #2 by "Daniel O'Dorisio" <dodorisio@o...> on Fri, 26 Oct 2001 15:30:31 -0400
response.write replace(objRS("field"), vbcrlf, "<br>")



daniel



-----Original Message-----

From: Matthew Lohr [mailto:mlohr@t...]

Sent: Friday, October 26, 2001 3:22 PM

To: ASP Databases

Subject: [asp_databases] Fomatted Output





I am trying to format the output from a database.  I have no control over

how the information in entered.  When I display it on the screen I want it

to look exactly as it was entered into the database.  I know I can do this

with a textarea but that makes someone scroll of the data is too long and

wastes space if it is too short.  How can i format this with line breaks
Message #3 by Kyle Burns <kburns@c...> on Fri, 26 Oct 2001 16:23:56 -0500
Have you tried placing the output between <pre> tags?  If you're just

shooting for maintaining line breaks, Why not filter the result through

Replace() and replace all occurences of vbCrLf with "<br>".  Try these and

see if either helps you.





=================================

Kyle M. Burns, MCSD, MCT

ECommerce Technology Manager

Centra Credit Union

kburns@c...



 



-----Original Message-----

From: Matthew Lohr [mailto:mlohr@t...]

Sent: Friday, October 26, 2001 2:22 PM

To: ASP Databases

Subject: [asp_databases] Fomatted Output





I am trying to format the output from a database.  I have no control over 

how the information in entered.  When I display it on the screen I want it 

to look exactly as it was entered into the database.  I know I can do this 

with a textarea but that makes someone scroll of the data is too long and 

wastes space if it is too short.  How can i format this with line breaks
Message #4 by "Matthew Lohr " <mlohr@t...> on Sat, 27 Oct 2001 21:10:23 -0400
Both great examples the replace method works for me.  Now if I can just get one more question in.  What
about when it comes to formating html.  I want to display the <br> in the browser.  Somehow ignore the HTML is this also
possible?



---------- Original Message ----------------------------------

From: Kyle Burns <kburns@c...>

Reply-To: "ASP Databases" <asp_databases@p...>

Date:  Fri, 26 Oct 2001 16:23:56 -0500



>Have you tried placing the output between <pre> tags?  If you're just

>shooting for maintaining line breaks, Why not filter the result through

>Replace() and replace all occurences of vbCrLf with "<br>".  Try these and

>see if either helps you.

>

>

>=================================

>Kyle M. Burns, MCSD, MCT

>ECommerce Technology Manager

>Centra Credit Union

>kburns@c...

>

> 

>

>-----Original Message-----

>From: Matthew Lohr [mailto:mlohr@t...]

>Sent: Friday, October 26, 2001 2:22 PM

>To: ASP Databases

>Subject: [asp_databases] Fomatted Output

>

>

>I am trying to format the output from a database.  I have no control over 

>how the information in entered.  When I display it on the screen I want it 

>to look exactly as it was entered into the database.  I know I can do this 

>with a textarea but that makes someone scroll of the data is too long and 

>wastes space if it is too short.  How can i format this with line breaks

Message #5 by "Matthew Lohr " <mlohr@t...> on Sun, 28 Oct 2001 10:21:17 -0500
Alright ignore my last request.  You guys already showed me how to do this.  I just used the same
function to get rid of the < > and replace it with &lt; and &gt;.  Dang you guys are smart



---------- Original Message ----------------------------------

From: "Matthew Lohr " <mlohr@t...>

Reply-To: "ASP Databases" <asp_databases@p...>

Date:  Sat, 27 Oct 2001 21:10:23 -0400



>Both great examples the replace method works for me.  Now if I can just get one more question in.  What about when it comes to
formating html.  I want to display the <br> in the browser.  Somehow ignore the HTML is this also possible?

>

>---------- Original Message ----------------------------------

>From: Kyle Burns <kburns@c...>

>Reply-To: "ASP Databases" <asp_databases@p...>

>Date:  Fri, 26 Oct 2001 16:23:56 -0500

>

>>Have you tried placing the output between <pre> tags?  If you're just

>>shooting for maintaining line breaks, Why not filter the result through

>>Replace() and replace all occurences of vbCrLf with "<br>".  Try these and

>>see if either helps you.

>>

>>

>>=================================

>>Kyle M. Burns, MCSD, MCT

>>ECommerce Technology Manager

>>Centra Credit Union

>>kburns@c...

>>

>> 

>>

>>-----Original Message-----

>>From: Matthew Lohr [mailto:mlohr@t...]

>>Sent: Friday, October 26, 2001 2:22 PM

>>To: ASP Databases

>>Subject: [asp_databases] Fomatted Output

>>

>>

>>I am trying to format the output from a database.  I have no control over 

>>how the information in entered.  When I display it on the screen I want it 

>>to look exactly as it was entered into the database.  I know I can do this 

>>with a textarea but that makes someone scroll of the data is too long and 

>>wastes space if it is too short.  How can i format this with line breaks

Message #6 by Kyle Burns <kburns@c...> on Mon, 29 Oct 2001 14:49:37 -0500
Use Server.HTMLEncode().  This function returns the supplied string with all

of the special HTML characters escaped (e.g. < is replaced with &gt;, etc.).





=================================

Kyle M. Burns, MCSD, MCT

ECommerce Technology Manager

Centra Credit Union

kburns@c...



 



-----Original Message-----

From: Matthew Lohr [mailto:mlohr@t...]

Sent: Saturday, October 27, 2001 8:10 PM

To: ASP Databases

Subject: [asp_databases] RE: Fomatted Output





Both great examples the replace method works for me.  Now if I can just get

one more question in.  What about when it comes to formating html.  I want

to display the <br> in the browser.  Somehow ignore the HTML is this also

possible?



---------- Original Message ----------------------------------

From: Kyle Burns <kburns@c...>

Reply-To: "ASP Databases" <asp_databases@p...>

Date:  Fri, 26 Oct 2001 16:23:56 -0500



>Have you tried placing the output between <pre> tags?  If you're just

>shooting for maintaining line breaks, Why not filter the result through

>Replace() and replace all occurences of vbCrLf with "<br>".  Try these and

>see if either helps you.

>

>

>=================================

>Kyle M. Burns, MCSD, MCT

>ECommerce Technology Manager

>Centra Credit Union

>kburns@c...

>

> 

>

>-----Original Message-----

>From: Matthew Lohr [mailto:mlohr@t...]

>Sent: Friday, October 26, 2001 2:22 PM

>To: ASP Databases

>Subject: [asp_databases] Fomatted Output

>

>

>I am trying to format the output from a database.  I have no control over 

>how the information in entered.  When I display it on the screen I want it 

>to look exactly as it was entered into the database.  I know I can do this 

>with a textarea but that makes someone scroll of the data is too long and 

>wastes space if it is too short.  How can i format this with line breaks


  Return to Index