Hi folks,
I have constructed a simple string outputed as HTML. The resulting html is then read by a soap tool by the customer. They say the string is not a valid HTML (or xml). It's simple as string using String class in C#:
string sLink = www.mycompany.com;
var=" Click this link " ;
The resulting output is:
<a href='www.mycompany.com'> Click this link </a>
Just puzzled why the lessthan char was converted to < and yet the greaterthan char is left as is?
If I do this:
var="<a href='" + sLink + "' > Click this link </a>";
Is this valid eventhough in my test tool this string shows as:
<a href='" + sLink + "' > Click this link </a>";
Thanks
Creating a valid HTML for XML reader using C#
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Sam HobbsRank #107 · 20.5K reputationPosted Apr 15, 2012, 7:41 PM EDT
You say the data is a simple string but somehow it is being converted. You need to determine where and how it is being converted. The explanation is not in anything shown here.