Special Characters in web page

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All:

I have a textbox in my web page, when user input "A & B" in this textbox,
then click save button, then in the database it store as "A & B", which is
good.
Bu the problem is when i select this field data and display to this textbox,
it change to "A & B". Anyone know how to handle this problem?

Cheers

Nick
 
Howdy,

Text is automatically encoded (special characters are replaced with escape
codes - & is a special character and after encoding equals &) see:

HttpServerUtility.HtmlEncode
HttpServerUtility.HtmlDecode

hope this helps

Milosz Skalecki
MCP, MCAD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top