I am trying to populate a gridview from sharepoint list and population is working good expect in one column i want to display and <a> tag
I have the following code:
StringBuilder cstext = new StringBuilder(); dr["Status"] = cstext.Append("<a>click me</a>"); but in my browser i am seeing this <a>click me</a> and in inspect element i am seeing this <a>click me</a>
Please help me
cstext.Append("<a>click me</a>").toString();?ToStringwon't help, as it's called anyway before rendering. The problem probably isHTMLEncode-ing the contentAppend()methods return value is intended for chaining (value.Append("a").Append("b")). Using it in the way you are using it (like a regular System.String) is probably going to lead to other unwanted side effects.