Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageOn 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
Post Follow-up to this message> 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
Post Follow-up to this messageOn 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
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.