Re: Using html tags pulled from an Access database in ASP page

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Alan Howard (Xalan.howardX_at_Xparadise.net.nzX)
Date: 06/10/04


Date: Thu, 10 Jun 2004 13:09:21 +1200

If a user enters a carriage return in a textarea it will be stored - no need
to worry about the how. Keep in mind that you want to separate the content
(what they type in) from the presentation (how or where it gets displayed).
Take whatever they type into the textarea and shove it into the database.
Transform it appropriately depending on what it's used for *after*
retrieving it. If you're displaying it on a web page then you can replace
vbCrLf pairs with <br> tags and Server.HTMLEncode the rest.

Alan

"BCS" <bruce_schaaf@hotmail.com> wrote in message
news:e162e1fd.0406091534.566eb0ff@posting.google.com...
> "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:<OLKwEYkTEHA.1508@TK2MSFTNGP11.phx.gbl>...
> > > like <br> in the input. However, while this information gets stored
> > > in the Access database correctly, when it gets pulled out the page
> > > displays the actual tag on the page. In other words, it actually
> > > converts the "<" to "&lt;" in the html so that it displays as "<" on
> > > the web page.
> >
> > What is "it"? Can you show the code that causes this bizarre symptom?
> >
> > Anyway, if you store plain text carriage returns in the database, you
don't
> > need to teach all of your users HTML. Just replace them with HTML
carriage
> > returns when you DISPLAY the data. http://www.aspfaq.com/2188
>
> "it" is simply the text from the access database. All I am doing is
> trying to display a text field from the Access database onto a web
> page. So maybe it's an Access question. How do you get the Access
> database to store the carriage returns from the web form input page?



Relevant Pages

  • Re: Formatting an inserted database field
    ... stop inserting unnecessary and unwanted Carriage Returns. ... DATABASE fields at some point which does cause an unhelpful extra ... When viewing the document without Show/Hide formatting selected (and ...
    (microsoft.public.word.mailmerge.fields)
  • RE: non relational database
    ... I commend you for letting the person who designed the database live - very ... In terms of splitting the strings, if each bit of data is delimited ... by a carriage return, you could write a VBA function that reads ... special character you may not be able to use it. ...
    (microsoft.public.access.modulesdaovba)
  • RegExp Question
    ... displaying this data through an HTML page. ... When inserting data into a database via a text area and then displaying ... I Created a function to replace a carriage return with a. ...
    (microsoft.public.scripting.vbscript)
  • Re: Exporting Text field line entries to individual records
    ... Been doing alot of searching on this group, and have not come up with ... Stuff that is entered in the field, followed by a carriage return: ... manually, except that are thousands of SP's in this database, and some ... calculation field that selects text between carriage returns. ...
    (comp.databases.filemaker)
  • Re: Formatting an inserted database field
    ... Microsoft made a change to the behaviour of DATABASE fields at some point which does cause an unhelpful extra paragraph to be inserted, but perhaps \*Charformat introduces another wrinkle I hadn't previously encountered, so thanks for posting back. ... however a hard carriage return is also appearing before ... When viewing the document without Show/Hide formatting selected (and ... before CHARFORMAT is applied to the field in the master document), ...
    (microsoft.public.word.mailmerge.fields)