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. Handle Bad characters

Handle Bad characters

Scheduled Pinned Locked Moved ASP.NET
databasequestionhelp
2 Posts 2 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.
  • S Offline
    S Offline
    slSoftware
    wrote on last edited by
    #1

    Hi I'm having web application connect with sql dbase. When i read data from database and render it to textbox control i used HttpUtility.HtmlDecode to render it, but there is windows application and it also try to render to same value it render as "&" (exact value in database). how can i solve this issue, is there standard way to overcome this issue? 1 . Do i need decode in windows application as well? 2. Is it good to show encode value in web application text box (&)?

    J 1 Reply Last reply
    0
    • S slSoftware

      Hi I'm having web application connect with sql dbase. When i read data from database and render it to textbox control i used HttpUtility.HtmlDecode to render it, but there is windows application and it also try to render to same value it render as "&" (exact value in database). how can i solve this issue, is there standard way to overcome this issue? 1 . Do i need decode in windows application as well? 2. Is it good to show encode value in web application text box (&)?

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      I HTML encode HTML before I store it in a database column, and then decode if I need the HTML to be decoded. It took me some years to figure it out after trial and error and various scenarios that came up. Those ampersands for example in AT&T can be quite annoying. Maybe others do it different.

      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