Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Inserts HTML line breaks before all newlines in a string
Hey,

If i'am writing a post in a "textarea" and i use the ENTER (newline) on my k
eyboard it comes as a line break <br> in my post on the forum.

PHP uses "nl2br", but what is the ASP solution for this? 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28-Sep-2004

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Mach
09-30-04 08:55 PM


Re: Inserts HTML line breaks before all newlines in a string
On Thu, 30 Sep 2004 08:02:11 -0400, "Chris Mach" <cjmach@gto.net>
wrote:

>If i'am writing a post in a "textarea" and i use the ENTER (newline) on my 
keyboard it comes as a line break <br> in my post on the forum.
>
>PHP uses "nl2br", but what is the ASP solution for this?

Depends on wht you actually want, but this may be what the equivalent
to PHP would be:

strPost = Replace(FormInput,VbCrLf,"<br>")

FormInput is what comes from the text area, strPost is the post with
HTML breaks.

Personally, I store the text verbatim in the database and replace on
retrieving it, but it could work either way.

Jeff

Report this thread to moderator Post Follow-up to this message
Old Post
Jeff Cochran
09-30-04 08:55 PM


Re: Inserts HTML line breaks before all newlines in a string

> Personally, I store the text verbatim in the database and replace on
> retrieving it, but it could work either way.

Yes, that is what I want to do, how is that done?

please? :D


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28-Sep-2004



Report this thread to moderator Post Follow-up to this message
Old Post
Chris Mach
09-30-04 08:55 PM


Re: Inserts HTML line breaks before all newlines in a string
On Thu, 30 Sep 2004 08:46:00 -0400, "Chris Mach" <cjmach@gto.net>
wrote:

> 
>
>Yes, that is what I want to do, how is that done?

Are you asking how to save a text input field to a database field,
retrieve the data from the database, format it for display or all of
the above?

Might look at:

http://www.1asphost.com/asp_db.asp

It's not perfect, but will get you started.

Jeff

Report this thread to moderator Post Follow-up to this message
Old Post
Jeff Cochran
10-01-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:44 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.