Converting text to an HTML string

Results 1 to 2 of 2

Thread: Converting text to an HTML string

  1. #1
    Join Date
    Dec 1969

    Default Converting text to an HTML string

    I have an ASP form that works fine with one small exception. I would like the information that a user enters in a textarea be automatically converted to HTML code upon submitting so it can be viewed with all the proper font formatting, etc... internally. Can this be done? If so, how may I go about doing this? Thanks in advance

  2. #2
    Richard L. Guest

    Default RE: Converting text to an HTML string

    I&#039m not sure exactly what you mean... but if you pass a user&#039s input from a textarea to another page:<BR><BR>userText = Request("textAreaName")<BR><BR>You can do whatever you want with it:<BR><BR>&#060;font face="Verdana" color="red"&#062;&#060;% response.write userText %&#062;&#060;/font&#062;<BR><BR>or if you want to keep the spaces, tabs and carriage returns placed by the user:<BR><BR>&#060;pre&#062;&#060;% response.write Request("textAreaName") %&#062;&#060;/pre&#062;<BR><BR>Is that what you mean?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts