本文介绍了如何在c#中编码字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在c#中编码字符串?
i add using system.web
我的代码是:
字符串 TestString = 这是一个< Test String>。;
字符串 EncodedString = Server.HtmlEncode(TestString);
或
System.Web.HttpUtility.HtmlEncode
但是我不能用这个
解决方案
how can I encode string in c#?
i add using system.web
and my code is:
String TestString = "This is a <Test String>."; String EncodedString = Server.HtmlEncode(TestString);
or
System.Web.HttpUtility.HtmlEncode
but i can't use this
解决方案
这篇关于如何在c#中编码字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!