Results 1 to 2 of 2

Thread: HTMLEncode

  1. #1
    Join Date
    Dec 1969

    Default HTMLEncode

    Hi,<BR>I&#039;m working on a content management system in ASP and I&#039;m saving the content of a page in the database with all its html tags. Before saving the content, I use HTMLEncode to replace any special characters that ASP cannot show correctly like &#060;, &#062; or ".<BR><BR>When I try to extract the contect from the database to show it in a page, It shows all the html tags with it. (Explorer automatically decode the encoded symbols from HTMLEncode ofcourse).<BR>How can I show the HTML content correctly with HTML tags interpreted? <BR>thanks for your help

  2. #2
    Join Date
    Dec 1969

    Default Why did you do that?

    Why did you encode the data before storing it?<BR><BR>That&#039;s basically a one-way operation. Once done, it&#039;s done.<BR><BR>It makes a heluva lot more sense to store the data "raw" and only do the Server.HTMLEncode when you display it in pages where you *want* the encoding done.<BR><BR>In short: You goofed.<BR><BR>

Posting Permissions

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