asp.net applications try to prevents cross site scripting attack so when we are putting a value directly to UI,i mean inner html a string which contain something like < > will be consider as cross script so it will not allow that.
Example :
string mystring="<asp:Button id="b1" Text="Submit" runat="server" />"
if we are trying to put this code directly to UI field then it will not allow us to do this
Note : we can off cross scripting feature in asp.net but it is not a good idea
Insted of asp controls you can use pure html controls then it will work.
string mystring="<input type="button" id="b1" Text="Submit" runat="server" />"
Note : if you are allowing user to enter sensitive information to your program always think about cross site scripting attack you need to prevent it.
HttpUtility.HtmlDecode encode your string
html encoding is to prevent cross site script attacks so it will work
Note: Encode Output
Use the HttpUtility.HtmlEncode method to encode output if it contains input from the user or from other sources such as databases. HtmlEncode replaces characters that have special meaning in HTML-to-HTML variables that represent those characters. For example, < is replaced with < and " is replaced with ". Encoded data does not cause the browser to execute code. Instead, the data is rendered as harmless HTML.
Ref :msdn