www.webdeveloper.com
Results 1 to 4 of 4

Thread: Request.Form Textareas

  1. #1
    Join Date
    Apr 2005
    Posts
    2

    Request.Form Textareas

    Hey i got a question, thought someone might know. When I request.form for a textarea all the text is clumped together in one string. Is there anyway to tell the textarea object to output the contents as a string with indents and spacing?

    Or do u think i should just attempt to find a good rich text editor, and if so do u know of any good ones?

    Thanks!
    -ColinJ

  2. #2
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    I normally replace line breaks with the HTML equivelant, which is <br />. This will retain the line breaks when the data is displayed on an HTML page. If you want to display the data in a text field again, you need to re-replace the <br /> elements with vbCrLf.
    Code:
    '| Replace line breaks with <br />
    Dim strContent: strContent = Replace(Request.Form("yourData"), vbCrLf, "<br />")
    Regards.

  3. #3
    Join Date
    Apr 2005
    Posts
    2
    That works wonders. Thanks!!!!
    -ColinJ

  4. #4
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles