首先,将Sy
stem.Web的引用
添加到项目中.然后,您可以在
HTML encoding之前存储HTML.只需在存储在
配置文件中的值上
调用HttpUtility.UrlDecode()即可.
你的配置文件:
<appSettings>
<add key="HTML" value="<p>My paragraph</p>"/>
</appSettings>
你的代码:
string html = HttpUtility.UrlDecode(ConfigurationManager.AppSettings["HTML"]);