Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图拉一个编码的字符串。如何将 Server.HtmlDecode 添加到以下表达式?
<%# DisplayResourceAddedFields(Eval("Body").ToString())%>
谢谢!
这取决于您是要在将数据项值传递给DisplayResourceAddedFields()方法之前还是之后进行解码。
DisplayResourceAddedFields()
如果之前:
<%# DisplayResourceAddedFields(Server.HtmlDecode(Eval("Body").ToString()))%>
如果之后:
<%# Server.HtmlDecode(DisplayResourceAddedFields(Eval("Body").ToString()))%>