tags are converted to <i>

Discussion in 'C#' started by likki_hari, May 13, 2008.

  1. #1
    The below string is exactly how it is stored in the database and when i project the this data to web page the <i>'s are changing to (&lt;i&gt;) these characters and in again the browser is converting these (&lt;i&gt;)characters to <i></i>

    anyone has any clue, i think the data is converted from the database like this.


    "<i>Science and Technology on Show</i> aims to enhance the teaching of science and technology."
     
    likki_hari, May 13, 2008 IP
  2. DPGBB

    DPGBB Peon

    Messages:
    96
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    DPGBB, May 13, 2008 IP
  3. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #3
    Use code tags in your post so we can see what you mean ... also, how are they being entered in the database? Please show that code.
     
    itcn, May 15, 2008 IP
  4. dylanj

    dylanj Peon

    Messages:
    173
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #4
    I think you're looking for Replace():
    
    <%
    Replace(string, look for this, and replace with this)
    %>
    
    Code (markup):
    You might want this:
    
    <%
    String = Replace(String, "&gt;", ">")
    String = Replace(String, "&lt;", "<")
    Response.Write(String)
    %>
    
    Code (markup):
     
    dylanj, May 16, 2008 IP