We are facing challenge while selecting values from a drop down on an web interface in case of item contains any special characters.
Actually, the special characters like & translated as & in html source.
We are facing challenge while selecting values from a drop down on an web interface in case of item contains any special characters.
Actually, the special characters like & translated as & in html source.
I think in html source only for some special characters it will change so instead of convert the html source to plain text it’s better to replace those text.
& - &
" - "
- >
< - <
String.Replace(“&”,“&”) - This will work for “&”
Actually , String gets translated in different set of characters and value which we want to find out does not appear as expected which causes problem.
You can use HttpUtility class to convert HTML codes.
HttpUtitlity.HtmlEncode(“&”)
HttpUtitlity.HtmlDecode(“&”)
The package is under System.Web