Results 1 to 3 of 3

Thread: HTML tags in text fields

  1. #1

    Thread Starter
    New Member
    Join Date
    May 1999
    Location
    Pakistan
    Posts
    5
    Hello;
    I am having trouble saving HTML special charecters like &uuml, &copy, &nbsp etc., in text fields.

    When I first write this syntax in the text field it is saved in the DB eg &uuml is saved.

    The problem comes when i reload this field in the text box. It displays the special charecter 'u' with a dot on each leg. Now when i save it again, it saves the special charecter 'u' to the database, and not &uuml. I want it to save &uuml and not the special charecter 'u'.

    I would appreciate if you could help.

    Thanks
    Samba

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    Try using the server.HTMLEncode method:
    strToSave = server.HTMLEncode(Request.Form("input"))
    "People who think they know everything are a great annoyance to those of us who do."

  3. #3

    Thread Starter
    New Member
    Join Date
    May 1999
    Location
    Pakistan
    Posts
    5
    It worked. Thanks

Posting Permissions

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



Click Here to Expand Forum to Full Width