hi guys,
as Internet Explorer shows   as space (pay attention!! " ", not " ")
I'd seen a method in .Net that implements it,
but I don't remember what method (this is not HttpUtility.HtmlDecode())
thanks a lot !
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Suthish NairRank #92 · 22.8K reputationPosted Jan 27, 2011, 6:55 AM EST
john smith7 reputationPosted Jan 27, 2011, 8:44 AM EST
thanks for help. but I didn't understand all.
could you please show me the full C# code?
and tell me if you used any references.
Thanks in advance
john smith7 reputationPosted Jan 27, 2011, 8:47 AM EST
i want .net method (by Microsoft) that replaces " " (without the ; in the end) to space.
thanks.
Suthish NairRank #92 · 22.8K reputationPosted Jan 27, 2011, 10:11 AM EST
Sam HobbsRank #108 · 20.5K reputationPosted Jan 27, 2011, 10:19 AM EST
I think you are trying to solve a problem and you think you have a solution and you are asking for help with the solution. If you were to describe what the fundamenatl problem is that you are trying to solve, you are more likely to get the most useful answer. So what do you need to do when you need to convert that text?
john smith7 reputationPosted Jan 29, 2011, 9:22 PM EST
Firstly, thanks for your replies my friends!
To make my task clearer:
I get an Html source text (".........") and have to show the text in a TextBox.
The special characters (" ", "<") have to be shown in the TextBox like they are shown in the html (space, "<").
(I don't want to put a browser in my application).
Additionaly, I have the expression " " which was " " before.
My boss told me he saw in his eyes, a .Net method that replaces both " " (without the ';') and " " to space.
(Internet Explorer of Microsoft shows " " without ';' as a space.
So, my job is to look for the .Net method that replaces/shows " " as space.
Thanks.
Sam HobbsRank #108 · 20.5K reputationPosted Jan 29, 2011, 10:24 PM EST
Where is the HTML file? Is it on a disk in your local system or is it in a web site?
Suthish NairRank #92 · 22.8K reputationPosted Jan 29, 2011, 11:02 PM EST
or try as below
String s = "<html><p>john </p><p>smith c#</p></html>"; s = Server.HtmlDecode(Server.HtmlDecode(s)); s = s.Replace(" ", " "); //s = s.Replace(" ", " "); s = Server.HtmlDecode(s); Response.Write(s);Suthish NairRank #92 · 22.8K reputationPosted Jan 30, 2011, 8:23 AM EST
So other members can easily find the answers.