1

I have some string with javascript format string following :

\u003Cdiv>\u003Cdiv class=\"mbm detail_research\">\u003Cdiv class=\"clearfix\">\u003Ca class=\"_8o _8r lfloat\" href=\"http:\/\/www.abcm.com\/mutily\/post.php?id=2344324342\" 

Anyone know about how to decode it to normal html string using C#?

My mean that it will become to :

<div><div class="mbm detail_research"><div class="clearfix"><a class="_8o _8r lfloat" href="http://www.abcm.com/mutily/post.php?id=2344324342"

after decoded.

Thanks for your help!

3
  • 3
    We decode does you mean, how to parse it? Commented Sep 27, 2012 at 4:30
  • Yeah @Deepesh. This is my mean. Thanks for your reply! Commented Sep 27, 2012 at 4:33
  • My answer is updated..will you try it?? Commented Sep 27, 2012 at 5:49

2 Answers 2

4

use HttpUtility Class to decode it as :

String myDecodedString = HttpUtility.HtmlDecode("Html encoded String here");

Follow this MSDN article

Sign up to request clarification or add additional context in comments.

2 Comments

I know about HttpUtility but my question is how to decode it. It's not html encode. Thanks!
so, update your answer that what type of decode you want??plz mention it in Question...
2

What you are looking for is Regex.Unescape

var decodedString = Regex.Unescape(yourString);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.