How do I read html out of database fields and show it

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • COHENMARVIN@lycos.com

    How do I read html out of database fields and show it

    I have database text fields that I am putting "<br />" in so that they
    will appear on the web page with linebreaks in the text where I want
    them. But when the fields are shown, this does not work - the source
    looks like &lt;br /&gt;. How do I get around this?
    Thanks,
    Marv
  • JJ

    #2
    Re: How do I read html out of database fields and show it

    Use a literal rather than a label to display it?
    JJ
    <COHENMARVIN@ly cos.comwrote in message
    news:bbedb60e-c9df-40db-b7db-c457224fd7aa@f3 6g2000hsa.googl egroups.com...
    >I have database text fields that I am putting "<br />" in so that they
    will appear on the web page with linebreaks in the text where I want
    them. But when the fields are shown, this does not work - the source
    looks like &lt;br /&gt;. How do I get around this?
    Thanks,
    Marv

    Comment

    • Patrice

      #3
      Re: How do I read html out of database fields and show it

      They are displayed using which controls ?

      See :
      Gets or sets a value indicating whether field values are HTML-encoded before they are displayed in a BoundField object.


      (this is a defautl safety measure but you can disable this if needed)


      --
      Patrice

      <COHENMARVIN@ly cos.coma écrit dans le message de groupe de discussion :
      bbedb60e-c9df-40db-b7db-c457224fd7aa...l egroups.com...
      I have database text fields that I am putting "<br />" in so that they
      will appear on the web page with linebreaks in the text where I want
      them. But when the fields are shown, this does not work - the source
      looks like &lt;br /&gt;. How do I get around this?
      Thanks,
      Marv

      Comment

      • clintonG

        #4
        Re: How do I read html out of database fields and show it

        The HTML is being encoded. Its HtmlEncode being used or the database is
        encoding the HTML. Learn how to avoid encoding the data and store it as
        unencoded HTML.



        <COHENMARVIN@ly cos.comwrote in message
        news:bbedb60e-c9df-40db-b7db-c457224fd7aa@f3 6g2000hsa.googl egroups.com...
        >I have database text fields that I am putting "<br />" in so that they
        will appear on the web page with linebreaks in the text where I want
        them. But when the fields are shown, this does not work - the source
        looks like &lt;br /&gt;. How do I get around this?
        Thanks,
        Marv

        Comment

        Working...