Look at this
and may be this can help too
Hope this help!
题
HttpUtility.HtmlEncode()
method and Server.HtmlEncode()
method?解决方案 2
其他提示
1) They are the same.
2) It's a matter of convenience: Server.HtmlEncode() is readily availalble at runtime from a web page for example whereas HttpUtility.HtmlEncode() is a static method that can be used from anywhere.