Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Get rid of the & quot; tags

Get rid of the & quot; tags

Scheduled Pinned Locked Moved ASP.NET
javascripthtmlcssxmlhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Johan de Koning
    wrote on last edited by
    #1

    I have a string which contains something like this strTest = "alert(\"test\")"; When i want to add this to a onclick event of a button for client-side action, i do this the following way: btnTest.Attributes.Add("onclick", testStr); This all works fine but when i look at the HTML code it is rendered to this: (Without the spaces between & and quot) There are & quot; tags rendered for the \" chars. But i want just that it is rendered like \" because it is sexier and less code to send to the client. Can someone help me with this. BTW, people will answer that i should use ' characters. But i also want to register some XML as an parameter of an javascript function. XML uses " chars and these are all rendered as & quot; So i want also this to be rendered like \" or i want a way to get " in the XML rendered like \' to the client Thanx

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups