471,319 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

Convert HTML Codes

Hi
I want to convert HTML codes ("!" , "#" , "$" , "%") to text
("!","#", "$", "%"). How can i do it without replacing one an one the codes?

Thanks in advance
Jan 13 '06 #1
3 6359
Jonathan,

You can use the static HtmlDecode method on the HttpUtils class in the
System.Web namespace.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jonathan" <@> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
Hi
I want to convert HTML codes ("!" , "#" , "$" , "%") to
text ("!","#", "$", "%"). How can i do it without replacing one an one the
codes?

Thanks in advance

Jan 13 '06 #2
You can go for regular expression...
have fun
"Jonathan" <@> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
Hi
I want to convert HTML codes ("!" , "#" , "$" , "%") to text ("!","#", "$", "%"). How can i do it without replacing one an one the codes?
Thanks in advance

Jan 13 '06 #3
No, just use Server.HtmlDecode(string s), where 'string s' is the encoded
characters you need to decode.

"Rahul Goel" <ra*********@gmail.com> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
You can go for regular expression...
have fun
"Jonathan" <@> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
Hi
I want to convert HTML codes ("!" , "#" , "$" , "%") to

text
("!","#", "$", "%"). How can i do it without replacing one an one the

codes?

Thanks in advance


Jan 14 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by petrovitch | last post: by
7 posts views Thread by Neil Varshneya | last post: by
1 post views Thread by Lamberti Fabrizio | last post: by
3 posts views Thread by iwdu15 | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.