Actually, I wanted to HTMLDecode a text using HttpUtility.HtmlDecode() function and it works properly with whole text, but I want to decode the text except some specific string. How can I do that?
Specifically, I don't want to decode < and >
Let's say my string is - < & >
HttpUtility.HtmlDecode(text) returns - < & >
Wanted Output - < & >
You could replace the strings you don't want to change to something the decoder will not recognize then bring them back to the original value. You need to make sure that the string you replace to is not something that can be found in the string normally.
An other option would be to split of your string and Decode only the part you want.
This is just a sample, some check and refactoring would need to be done.