Is there an easy way to replace entities like & #039; with ' within a string? I found one that unescapes URLs (for example %20-> space) but not one that unescapes HTML codes like > and the like.
Is there an easy way to replace entities like & #039; with ' within a string? I found one that unescapes URLs (for example %20-> space) but not one that unescapes HTML codes like > and the like.
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.
Have you looked into the ASP.Net classes for whether there's a utility that does what you want?
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
Aye...check System.Web.HttpUtility.HtmlDecode().
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
Yeah, I was looking for one, didn't see that. Thanks!
Edit: It says HttpUtility isn't in the System.Web namespace, in fact my System.Web namespace is all but empty.
Edit200,000: OK figured it out, needed to add a reference to my project. Works fine now, thanks!
Last edited by Cat; 11-16-2006 at 12:28 AM.
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.