Assign text in textarea to a variable

Posted on 2005-04-20
Last Modified: 2013-12-24
Is there a way that I can assign the text written in a textare to a variable so that I can store it in a database?

Question by:21erinswift
    LVL 12

    Accepted Solution

    Are you talking about a text area form box?

    If yes then all you need to is request.form("textareaname").

    When the user submits the form to your asp page you can get the data from the submission. One thing of caution it that users routinely put single quotes in text area boxes so I would do something like:

    varText = replace(request.form('textareaname"), "'", "''")

    This will replace all single quotes with two single quotes and allow the sql statement to write the single quote.


    Author Comment

    Thanks for responding RCMB.  I just found a typo on my part that I didn't see before that was causing the problem.  
    LVL 12

    Expert Comment

    So what happens next -- close this question by awarding me the points as my answer will work or get a refund?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Android App Development

    This course will involve creating widgets, customize list view, grid view, spinners, etc. Creating applications using audio, video, and SQLite database. Ending with publication on Google Play.

    This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
    Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
    The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
    The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now