【发布时间】:2013-05-17 19:05:57
【问题描述】:
我正在尝试在我的元数据描述中添加复选标记。由于我的网站是多语言的,所以我添加如下描述
<%@ Page MetaDescription="<%$Resources:metadescription%>
当我添加这些代码时,复选标记代码 (http://www.fileformat.info/info/unicode/char/2713/index.htm)
✓
或
✓
或者正如某人已经建议的那样:
✔
在我的 Visual Studio 2012 资源文件 (default.aspx.resx) 中,它们被呈现为确切的代码,而不是我期望的复选标记。如何将复选标记呈现到 HTML 而不是代码?
我将此行添加到我的母版页:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
当我直接在 HTML 中输入这段代码时:
✔
所以在 default.aspx 中,复选标记正确呈现!
当我替换时
<%@ Page MetaDescription="<%$Resources:metadescription%>"
与
<%@ Page MetaDescription="<%=$Resources:metadescription%>"
我只是在我的 HTML 中得到这个:
<meta name="description" content="<%=$Resources:metadescription%>" />
资源文件中的 HTML 代码似乎有问题,但是如何解决呢?
【问题讨论】:
标签: html unicode visual-studio-2012 resource-files