49 users online (1 members and 48 guests)  


  Results 1 to 3 of 3

Related

  1. reading data from the textarea type    Forum: ASP Forum
    Replies: 9
  2. How to Decode the data from Database using database handler?    Forum: Search Engine Optimization - SEO - Forum
    Replies: 1
  3. Replies: 1
  1. #1
    preetimoney's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    2

    Displaying data from database in TEXTAREA of form

    Hi,
    I am designing a HTML form wherein users enter some inputs such as their remarks and commentsin textarea. Theses remarks are sved on to database. In the "Edit" mode, the form must be displayed and these entered comments must be displayed in the text area for th users to be able to modify them. How do I achieve it?
    In the case of text boxes, it is easy since if you give <INPUT TYPE="TEXT" VALUE="retrieved database field bvalue"> the database content will be displayed, but since the <TEXTAREA> tag does not have an attribute called VALUE, how do I display the contents of the text area which has been successfully saved in the database?
    I am programming in ASP with MS Access as backend. Pls help

  2. #2
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: Displaying data from database in TEXTAREA of form

    HTML Code:
    <textarea name="contents">[retrieved database value]</textarea>
    I believe should do the trick.

    I've deleted the duplicate post - please keep your questions in a single place.

  3. #3
    David Albert's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    9

    Exclamation Re: Displaying data from database in TEXTAREA of form

    In Asp.net page add a textbox and change its "TextMode" property to "MultiLine" than it will become a textarea as it is in HTML and then get its value in a string as follows:
    string textareaValue = TextBox1.Text;
    TextBox1 is the name of the textbox
    regards.



Tags for this Thread